You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The eager hardwiring of macro-processing in Analyzer makes an early call to Quasiquotes (in FastTrack), more specifically making a 2.11 scala-reflect.jar mandatory on the classpath of a 2.11 typer run which requires scala-reflect.jar.
To be more clear, you can run without scala-reflect on classpath, but if it's there, it needs to be the version that includes quasiquotes, i.e. 2.11.
However, It would be enjoyable to run typer with a 2.10 scala-reflect.jar on classpath (specifically for typing 2.10 projects, possibly referring to scala.reflect, with a 2.11 compiler using the -Xsource flag).
Perhaps the FastTrack optimization should be optional (depending on whether Quasiquotes are available), but more importantly, testing for the availability of the Quasiquotes Class in scala.reflect.Definitions should be more subtle than just testing if the reflection APi is there:
This throws a scala.reflect.internal.FatalError: class Universe does not have a member Quasiquote on any run that does not include the right scala-reflect.jar on classpath, despite those runs making sense.
A stopgap fix would be to add a test for the Xsource setting (>= 2.11) in the condition above. But it would be better, I think, to have the non-throwing version of getMember there, that returns NoSymbol if the quasiquotes member is not defined. I have fixes for both options ready to be pull-requested, just chime in with your vote.
Whip out your favorite fresh scala 2.11 compiler (e.g. nightly, RC-1) and delete the line that forces '-Dscala.usejavacp=true' from the end of the scalac runner script (9th line from the end on unix, only needed if your version doesn't have SI-8368 respect user-supplied -Dscala.usejavacp in unix runner scala#3608 )
Locate your favorite 2.10 scala-reflect.jar and scala-library.jar
error: scala.reflect.internal.FatalError:classUniverse does not have a member Quasiquote
at scala.reflect.internal.Definitions$DefinitionsClass.scala$reflect$internal$Definitions$DefinitionsClass$$fatalMissingSymbol(Definitions.scala:1163)
at scala.reflect.internal.Definitions$DefinitionsClass.getMember(Definitions.scala:1180)
at scala.reflect.internal.Definitions$DefinitionsClass.QuasiquoteClass$lzycompute(Definitions.scala:504)
at scala.reflect.internal.Definitions$DefinitionsClass.QuasiquoteClass(Definitions.scala:504)
at scala.reflect.internal.Definitions$DefinitionsClass.QuasiquoteClass_api$lzycompute(Definitions.scala:505)
at scala.reflect.internal.Definitions$DefinitionsClass.QuasiquoteClass_api(Definitions.scala:505)
at scala.reflect.internal.Definitions$DefinitionsClass.QuasiquoteClass_api_apply$lzycompute(Definitions.scala:506)
at scala.reflect.internal.Definitions$DefinitionsClass.QuasiquoteClass_api_apply(Definitions.scala:506)
at scala.tools.reflect.FastTrack$$anonfun$1.apply(FastTrack.scala:53)
at scala.tools.reflect.FastTrack$$anonfun$1.apply(FastTrack.scala:43)
at scala.reflect.internal.SymbolTable$perRunCaches$$anonfun$newGeneric$1.apply(SymbolTable.scala:386)
at scala.tools.reflect.FastTrack$class.fastTrack(FastTrack.scala:42)
at scala.tools.nsc.Global$$anon$1.fastTrack(Global.scala:458)
at scala.tools.nsc.typechecker.Namers$Namer.methodSig(Namers.scala:1188)
at scala.tools.nsc.typechecker.Namers$Namer.getSig$1(Namers.scala:1525)
at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1537)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply$mcV$sp(Namers.scala:781)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:780)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:780)
at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$logAndValidate(Namers.scala:1564)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:780)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:772)
at scala.tools.nsc.typechecker.Namers$$anon$1.completeImpl(Namers.scala:1679)
at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter$class.complete(Namers.scala:1687)
at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1677)
at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1429)
at scala.reflect.internal.Symbols$Symbol.initialize(Symbols.scala:1576)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4918)
Notice the contents of ./src/play-ws/src/main/scala/play/api/libs/oauth/package.scala, namely
packageplay.api.libspackageobjectoauth
run the scalac command line above, this time removing scala-reflect.jar from classpath. This time everything runs fine.
The text was updated successfully, but these errors were encountered:
The eager hardwiring of macro-processing in Analyzer makes an early call to Quasiquotes (in FastTrack), more specifically making a 2.11
scala-reflect.jar
mandatory on the classpath of a 2.11 typer run which requiresscala-reflect.jar
.To be more clear, you can run without scala-reflect on classpath, but if it's there, it needs to be the version that includes quasiquotes, i.e. 2.11.
However, It would be enjoyable to run typer with a 2.10
scala-reflect.jar
on classpath (specifically for typing 2.10 projects, possibly referring to scala.reflect, with a 2.11 compiler using the -Xsource flag).Perhaps the FastTrack optimization should be optional (depending on whether Quasiquotes are available), but more importantly, testing for the availability of the Quasiquotes Class in
scala.reflect.Definitions
should be more subtle than just testing if the reflection APi is there:This throws a
scala.reflect.internal.FatalError: class Universe does not have a member Quasiquote
on any run that does not include the rightscala-reflect.jar
on classpath, despite those runs making sense.A stopgap fix would be to add a test for the Xsource setting (>= 2.11) in the condition above. But it would be better, I think, to have the non-throwing version of
getMember
there, that returnsNoSymbol
if the quasiquotes member is not defined. I have fixes for both options ready to be pull-requested, just chime in with your vote.The formal reproduction details follow:
Steps to reproduce :
./src/play-ws/src/main/scala/play/api/libs/oauth/package.scala
, namelyscala-reflect.jar
from classpath. This time everything runs fine.The text was updated successfully, but these errors were encountered: