Closed
Description
minimized code
Compile and run example dotty/run-staging/quote-var.scala.
> dotc -d c:\temp\classes tests\run-staging\quote-var.scala > dir c:\Temp\classes | findstr Test 11.12.2019 18:12 2 739 Test$$anon$1.class 11.12.2019 18:12 6 398 Test$.class 11.12.2019 18:12 4 028 Test$Var$.class 11.12.2019 18:12 528 Test$Var.class 11.12.2019 18:12 546 Test.class 11.12.2019 18:12 2 629 Test.tasty > dotr -with-compiler -cp c:\temp\classes Test exception caught when loading module class Quoted$: class dotty.tools.dotc.reporting.diagnostic.messages$Error at ?: not found: \drone\src\library\src\scala\internal\Quoted.scala [..(see stack trace below)..]
Successful execution should print the string "xyz
".
Stack trace
exception caught when loading module class Quoted$: class dotty.tools.dotc.reporting.diagnostic.messages$Error at ?: not found: \drone\src\library\src\scala\internal\Quoted.scala Exception in thread "main" class dotty.tools.dotc.reporting.diagnostic.messages$Error at ?: not found: \drone\src\library\src\scala\internal\Quoted.scala at dotty.tools.dotc.reporting.Reporting.error(Reporter.scala:135) at dotty.tools.dotc.core.Contexts$Context.error(Contexts.scala:75) at dotty.tools.dotc.CompilationUnit$.apply(CompilationUnit.scala:93) at dotty.tools.dotc.core.Contexts$Context.withSource(Contexts.scala:471) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.sourceChangeContext(TreeUnpickler.scala:1346) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.processPackage(TreeUnpickler.scala:705) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.indexStats(TreeUnpickler.scala:690) at dotty.tools.dotc.core.tasty.TreeUnpickler.enter(TreeUnpickler.scala:98) at dotty.tools.dotc.core.tasty.DottyUnpickler.enter(DottyUnpickler.scala:54) at dotty.tools.dotc.core.classfile.ClassfileParser.unpickleTASTY$1(ClassfileParser.scala:748) at dotty.tools.dotc.core.classfile.ClassfileParser.unpickleOrParseInnerClasses(ClassfileParser.scala:812) at dotty.tools.dotc.core.classfile.ClassfileParser.parseClass(ClassfileParser.scala:163) at dotty.tools.dotc.core.classfile.ClassfileParser.run(ClassfileParser.scala:88) at dotty.tools.dotc.core.ClassfileLoader.load(SymbolLoaders.scala:400) at dotty.tools.dotc.core.ClassfileLoader.doComplete(SymbolLoaders.scala:395) at dotty.tools.dotc.core.SymbolLoader$$anon$1.doComplete(SymbolLoaders.scala:321) at dotty.tools.dotc.core.SymbolLoader.complete(SymbolLoaders.scala:340) at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:257) at dotty.tools.dotc.core.Denotations$Denotation.completeInfo$1(Denotations.scala:182) at dotty.tools.dotc.core.Denotations$Denotation.info(Denotations.scala:184) at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:397) at dotty.tools.dotc.core.SymDenotations$SymDenotation.flags(SymDenotations.scala:156) at dotty.tools.dotc.core.SymDenotations$ModuleCompleter.complete(SymDenotations.scala:2268) at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:257) at dotty.tools.dotc.core.Denotations$Denotation.completeInfo$1(Denotations.scala:182) at dotty.tools.dotc.core.Denotations$Denotation.info(Denotations.scala:184) at dotty.tools.dotc.core.Denotations$Denotation.requiredClass(Denotations.scala:338) at dotty.tools.dotc.core.Definitions.InternalQuoted_QuoteTypeTagAnnot(Definitions.scala:666) at dotty.tools.dotc.core.quoted.PickledQuotes$$anon$1.apply(PickledQuotes.scala:56) at dotty.tools.dotc.core.quoted.PickledQuotes$.dotty$tools$dotc$core$quoted$PickledQuotes$$$dealiasTypeTags(PickledQuotes.scala:61) at dotty.tools.dotc.core.quoted.PickledQuotes$$anon$2.transform(PickledQuotes.scala:73) at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1294) at dotty.tools.dotc.core.quoted.PickledQuotes$$anon$2.transform(PickledQuotes.scala:73) at dotty.tools.dotc.core.quoted.PickledQuotes$.unpickleExpr(PickledQuotes.scala:76) at dotty.tools.dotc.tastyreflect.ReflectionCompilerInterface.unpickleExpr(ReflectionCompilerInterface.scala:38) at scala.runtime.quoted.Unpickler$.unpickleExpr$direct(Unpickler.scala:16) at Test$$anon$1.update(quote-var.scala:18) at Test$.test1$$anonfun$4$$anonfun$3$1$$anonfun$1(quote-var.scala:28) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readHole(TreeUnpickler.scala:1291) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1202) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1210) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1115) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1210) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readIndexedStat(TreeUnpickler.scala:947) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readIndexedStats$$anonfun$1(TreeUnpickler.scala:986) at dotty.tools.tasty.TastyReader.until(TastyReader.scala:125) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readIndexedStats(TreeUnpickler.scala:986) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readStats(TreeUnpickler.scala:990) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1103) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1210) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1115) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1210) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1006) at dotty.tools.dotc.core.tasty.TreeUnpickler.unpickle(TreeUnpickler.scala:107) at dotty.tools.dotc.core.tasty.DottyUnpickler.computeRootTrees(DottyUnpickler.scala:59) at dotty.tools.dotc.ast.tpd$TreeProvider.rootTrees(tpd.scala:1107) at dotty.tools.dotc.core.tasty.DottyUnpickler.rootTrees(DottyUnpickler.scala:41) at dotty.tools.dotc.ast.tpd$TreeProvider.tree(tpd.scala:1111) at dotty.tools.dotc.core.tasty.DottyUnpickler.tree(DottyUnpickler.scala:41) at dotty.tools.dotc.core.quoted.PickledQuotes$.unpickle(PickledQuotes.scala:131) at dotty.tools.dotc.core.quoted.PickledQuotes$.unpickleExpr(PickledQuotes.scala:66) at dotty.tools.dotc.tastyreflect.ReflectionCompilerInterface.unpickleExpr(ReflectionCompilerInterface.scala:38) at scala.runtime.quoted.Unpickler$.unpickleExpr$direct(Unpickler.scala:16) at Test$.test1$$anonfun$1(quote-var.scala:30) at Test$Var$.apply$$anonfun$3$2$$anonfun$1(quote-var.scala:19) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readHole(TreeUnpickler.scala:1291) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1202) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1210) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1115) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1210) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1104) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1210) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1115) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1210) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1006) at dotty.tools.dotc.core.tasty.TreeUnpickler.unpickle(TreeUnpickler.scala:107) at dotty.tools.dotc.core.tasty.DottyUnpickler.computeRootTrees(DottyUnpickler.scala:59) at dotty.tools.dotc.ast.tpd$TreeProvider.rootTrees(tpd.scala:1107) at dotty.tools.dotc.core.tasty.DottyUnpickler.rootTrees(DottyUnpickler.scala:41) at dotty.tools.dotc.ast.tpd$TreeProvider.tree(tpd.scala:1111) at dotty.tools.dotc.core.tasty.DottyUnpickler.tree(DottyUnpickler.scala:41) at dotty.tools.dotc.core.quoted.PickledQuotes$.unpickle(PickledQuotes.scala:131) at dotty.tools.dotc.core.quoted.PickledQuotes$.unpickleExpr(PickledQuotes.scala:66) at dotty.tools.dotc.tastyreflect.ReflectionCompilerInterface.unpickleExpr(ReflectionCompilerInterface.scala:38) at scala.runtime.quoted.Unpickler$.unpickleExpr$direct(Unpickler.scala:16) at Test$Var$.apply(quote-var.scala:22) at Test$.test1(quote-var.scala:31) at Test$.$anonfun$1(quote-var.scala:36) at scala.quoted.staging.package$.run$$anonfun$1(staging.scala:19) at scala.quoted.staging.QuoteCompiler$QuotedFrontend.runOn$$anonfun$1(QuoteCompiler.scala:71) at scala.collection.immutable.List.flatMap(List.scala:265) at scala.quoted.staging.QuoteCompiler$QuotedFrontend.runOn(QuoteCompiler.scala:84) at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:161) at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15) at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10) at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323) at dotty.tools.dotc.Run.runPhases$5(Run.scala:171) at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:179) at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:65) at dotty.tools.dotc.Run.compileUnits(Run.scala:186) at dotty.tools.dotc.Run.compileUnits(Run.scala:128) at scala.quoted.staging.QuoteCompiler$ExprRun.compileExpr(QuoteCompiler.scala:104) at scala.quoted.staging.QuoteDriver.run(QuoteDriver.scala:37) at scala.quoted.staging.Toolbox$$anon$1.run(Toolbox.scala:36) at scala.quoted.staging.package$.run(staging.scala:19) at Test$.main(quote-var.scala:37) at Test.main(quote-var.scala)
Environment
> ver Microsoft Windows [version 10.0.18362.476] > java -version openjdk version "1.8.0_232" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode) > dotc -version Dotty compiler version 0.21.0-bin-20191211-731ee3c-NIGHTLY-git-731ee3c -- Copyright 2002-2019, LAMP/EPFL
Full Java command behind dotc.bat
(NB. Starting with version 0.21 jar file tasty-core_XXX.jar
is part of the class path) :
"C:\opt\jdk-1.8.0_232-b09\bin\java.exe" -Xmx2048m -XX:ReservedCodeCacheSize=2048m -XX:MaxMetaspaceSize=1024m -classpath C:\opt\dotty-0.20.0-RC1\lib\scala-library-2.13.1.jar;C:\opt\dotty-0.20.0-RC1\lib\dotty-library_0.21-0.21.0-bin-20191211-731ee3c-NIGHTLY.jar;C:\opt\dotty-0.20.0-RC1\lib\scala-asm-7.0.0-scala-1.jar;C:\opt\dotty-0.20.0-RC1\lib\compiler-interface-1.2.5.jar;C:\opt\dotty-0.20.0-RC1\lib\dotty-interfaces-0.21.0-bin-20191211-731ee3c-NIGHTLY.jar;C:\opt\dotty-0.20.0-RC1\lib\dotty-compiler_0.21-0.21.0-bin-20191211-731ee3c-NIGHTLY.jar;C:\opt\dotty-0.20.0-RC1\lib\tasty-core_0.21-0.21.0-bin-20191211-731ee3c-NIGHTLY.jar;C:\opt\dotty-0.20.0-RC1\lib\dotty-staging_0.21-0.21.0-bin-20191211-731ee3c-NIGHTLY.jar;C:\opt\dotty-0.20.0-RC1\lib\jline-reader-3.9.0.jar;C:\opt\dotty-0.20.0-RC1\lib\jline-terminal-3.9.0.jar;C:\opt\dotty-0.20.0-RC1\lib\jline-terminal-jna-3.9.0.jar;C:\opt\dotty-0.20.0-RC1\lib\jna-4.2.2.jar -Dscala.usejavacp=true dotty.tools.dotc.Main -d c:\temp\classes tests\run-staging\quote-var.scala
Full Java command behind dotr.bat
(NB. Starting with version 0.21 jar file tasty-core_XXX.jar
is part of the class path with Dotty option -with-compiler
) :
"C:\opt\jdk-1.8.0_232-b09\bin\java.exe" -classpath "C:\opt\dotty-0.20.0-RC1\lib\dotty-library_0.21-0.21.0-bin-20191211-731ee3c-NIGHTLY.jar;C:\opt\dotty-0.20.0-RC1\lib\scala-library-2.13.1.jar;c:\temp\classes;C:\opt\dotty-0.20.0-RC1\lib\dotty-compiler_0.21-0.21.0-bin-20191211-731ee3c-NIGHTLY.jar;C:\opt\dotty-0.20.0-RC1\lib\dotty-interfaces-0.21.0-bin-20191211-731ee3c-NIGHTLY.jar;C:\opt\dotty-0.20.0-RC1\lib\scala-asm-7.0.0-scala-1.jar;C:\opt\dotty-0.20.0-RC1\lib\tasty-core_0.21-0.21.0-bin-20191211-731ee3c-NIGHTLY.jar;C:\opt\dotty-0.20.0-RC1\lib\dotty-staging_0.21-0.21.0-bin-20191211-731ee3c-NIGHTLY.jar" Test