-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime staging cannot handle compiling functions with a second non-primitive argument #19176
Labels
Comments
christophkoch
added
itype:bug
itype:crash
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
Dec 3, 2023
hamzaremmal
added
area:metaprogramming:quotes
Issues related to quotes and splices
and removed
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
Dec 3, 2023
christophkoch
changed the title
Runtime staging cannont handle compiling functions with a second non-primitive argument
Runtime staging cannot handle compiling functions with a second non-primitive argument
Dec 3, 2023
This has the same issue and solution as #19170 (comment) |
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 12, 2024
This addresses part of scala#19211, scala#19170, and scala#19176
Closed by #20137. Ensuring that the correct class loader was passed might be near-impossible, but we have improved the reporting here so that it's handled as a thrown exception rather than printing on stdout and we also include a hint on what may be wrong with the classloader in the exception message. |
WojciechMazur
pushed a commit
that referenced
this issue
Jun 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Compiler version
3.3.1
Minimized code
Output (click arrow to expand)
[info] running run
exception while retyping def $anonfun(q: A, x: Int): Int =
{
x
} of class DefDef # -1
An unhandled exception was thrown in the compiler.
Please file a crash report here:
https://github.com/lampepfl/dotty/issues/new/choose
symbol definition: def apply(): Object (a Symbol)
symbol package:
symbol owners: in class Generated$Code$From$Quoted
call site: method apply in class Generated$Code$From$Quoted in module class
== Source file context for tree position ==
Exception in thread "sbt-bg-threads-1" java.lang.ExceptionInInitializerError
at run.main(Bug2.scala:7)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at sbt.Run.invokeMain(Run.scala:143)
at sbt.Run.execute$1(Run.scala:93)
at sbt.Run.$anonfun$runWithLoader$5(Run.scala:120)
at sbt.Run$.executeSuccess(Run.scala:186)
at sbt.Run.runWithLoader(Run.scala:120)
at sbt.Defaults$.$anonfun$bgRunTask$6(Defaults.scala:1980)
at sbt.Defaults$.$anonfun$termWrapper$2(Defaults.scala:1919)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.util.Try$.apply(Try.scala:213)
at sbt.internal.BackgroundThreadPool$BackgroundRunnable.run(DefaultBackgroundJobService.scala:366)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: dotty.tools.FatalError: cannot resolve reference to type ( : .type).A
the classfile defining the type might be missing from the classpath
or the self type of ( : .type) might not contain all transitive dependencies
at dotty.tools.FatalError$.apply(FatalError.scala:3)
at dotty.tools.dotc.core.TypeErasure.checkedSuperType(TypeErasure.scala:717)
at dotty.tools.dotc.core.TypeErasure.dotty$tools$dotc$core$TypeErasure$$apply(TypeErasure.scala:602)
at dotty.tools.dotc.core.TypeErasure.paramErasure$1(TypeErasure.scala:650)
at dotty.tools.dotc.core.TypeErasure.$anonfun$1(TypeErasure.scala:658)
at scala.collection.immutable.List.mapConserve(List.scala:472)
at dotty.tools.dotc.core.TypeErasure.dotty$tools$dotc$core$TypeErasure$$apply(TypeErasure.scala:658)
at dotty.tools.dotc.core.TypeErasure.eraseInfo(TypeErasure.scala:773)
at dotty.tools.dotc.core.TypeErasure$.transformInfo(TypeErasure.scala:244)
at dotty.tools.dotc.transform.Erasure.transform(Erasure.scala:97)
at dotty.tools.dotc.core.Denotations$SingleDenotation.goForward$1(Denotations.scala:826)
at dotty.tools.dotc.core.Denotations$SingleDenotation.current(Denotations.scala:872)
at dotty.tools.dotc.core.Types$NamedType.computeDenot(Types.scala:2361)
at dotty.tools.dotc.core.Types$NamedType.denot(Types.scala:2324)
at dotty.tools.dotc.ast.Trees$DenotingTree.denot(Trees.scala:256)
at dotty.tools.dotc.ast.Trees$Tree.symbol(Trees.scala:145)
at dotty.tools.dotc.typer.ReTyper.retrieveSym(ReTyper.scala:119)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:3014)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3111)
at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:146)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3184)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3188)
at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3210)
at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3256)
at dotty.tools.dotc.transform.Erasure$Typer.typedStats(Erasure.scala:1052)
at dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:1159)
at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1163)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:3056)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3112)
at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:146)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3184)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3188)
at dotty.tools.dotc.typer.Typer.typedInlined(Typer.scala:2047)
at dotty.tools.dotc.transform.Erasure$Typer.typedInlined(Erasure.scala:897)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:3070)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3112)
at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:146)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3184)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3181)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3188)
at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3300)
at dotty.tools.dotc.typer.Typer.$anonfun$57(Typer.scala:2486)
at dotty.tools.dotc.inlines.PrepareInlineable$.dropInlineIfError(PrepareInlineable.scala:243)
at dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:2486)
at dotty.tools.dotc.transform.Erasure$Typer.typedDefDef(Erasure.scala:953)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:3024)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3111)
at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:146)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3184)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3188)
at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3210)
at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3256)
at dotty.tools.dotc.transform.Erasure$Typer.typedStats(Erasure.scala:1052)
at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:2669)
at dotty.tools.dotc.transform.Erasure$Typer.typedClassDef(Erasure.scala:1041)
at dotty.tools.dotc.typer.Typer.typedTypeOrClassDef$1(Typer.scala:3036)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:3040)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3111)
at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:146)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3184)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3188)
at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3210)
at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3256)
at dotty.tools.dotc.transform.Erasure$Typer.typedStats(Erasure.scala:1052)
at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:2812)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:3081)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3112)
at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:146)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3184)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3188)
at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3300)
at dotty.tools.dotc.transform.Erasure.run(Erasure.scala:144)
at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:327)
at scala.collection.immutable.List.map(List.scala:246)
at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:331)
at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:246)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1321)
at dotty.tools.dotc.Run.runPhases$1(Run.scala:262)
at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:270)
at dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:279)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
at dotty.tools.dotc.Run.compileUnits(Run.scala:279)
at dotty.tools.dotc.Run.compileUnits(Run.scala:200)
at scala.quoted.staging.QuoteCompiler$ExprRun.compileExpr(QuoteCompiler.scala:118)
at scala.quoted.staging.QuoteDriver.run(QuoteDriver.scala:43)
at scala.quoted.staging.Compiler$$anon$1.run(Compiler.scala:38)
at scala.quoted.staging.package$.run(staging.scala:19)
at Bug2$package$.(Bug2.scala:5)
... 18 more
The text was updated successfully, but these errors were encountered: