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
Use of companionSymbol
in custom namer leads to cyclic errors.
#7
Comments
What's worse, is that the subproject ( |
This might be stemming from some aspect of SBT's compiler caching, I'm checking with @harrah |
I'm working with: retronym/specs2@f75bc21 |
scalamacros/paradise#7 Also of great interest is how paradise, included only in specs-matchers-extra, is leaking into the compilers of other sub-projects.
I found the SBT problem: the specs2 build defined an überproject that aggregates the sources/classpaths of all others. That's why saw paradise involved in compiling sources from other modules. That said, this goes to highlight a funny problem with hacks/hijacking etc: it is much harder to know what to trust and who to blame. Even when the hack isn't to blame, it is! :) |
@retronym Thank you for the detailed investigation. Indeed, using paradise here led to unpredictable effects. How could we guard ourselves against them in the future? |
|
Are you in Lausanne now? I could drop by, so that we could decide what immediate steps should be taken on my side. |
Still a few hours away. I'll drop by when I get there. |
This is the only part that depends on macro paradise. In order to be able to easily test Specs2 against arbitrary snapshot builds of Scala 2.11, it's advantageous to be able to build the other 95% independently. This also prevents us getting stuck in the face of bugs like: scalamacros/paradise#7 > show specs2-matcher-extra/scalacOptions [info] List(-Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xplugin:/Users/jason/.ivy2/cache/org.scala-lang.plugins/macro-paradise_2.10.3/jars/macro-paradise_2.10.3-2.0.0-SNAPSHOT.jar) [success] Total time: 0 s, completed Nov 28, 2013 11:07:12 AM > set disableMatcherExtras in ThisBuild := true [info] Defining {.}/*:disableMatcherExtras [info] The new value will be used by specs2-matcher-extra/*:libraryDependencies, specs2-matcher-extra/compile:sources, specs2-matcher-extra/test:sources [info] Reapplying settings... [info] Set current project to specs2 (in build file:/Users/jason/code/specs2/) > show specs2-matcher-extra/scalacOptions [info] Resolving org.fusesource.jansi#jansi;1.4 ... [info] Done updating. [info] List(-Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_)
scalamacros/paradise#7 Also of great interest is how paradise, included only in specs-matchers-extra, is leaking into the compilers of other sub-projects.
This is the only part that depends on macro paradise. In order to be able to easily test Specs2 against arbitrary snapshot builds of Scala 2.11, it's advantageous to be able to build the other 95% independently. This also prevents us getting stuck in the face of bugs like: scalamacros/paradise#7 > show specs2-matcher-extra/scalacOptions [info] List(-Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xplugin:/Users/jason/.ivy2/cache/org.scala-lang.plugins/macro-paradise_2.10.3/jars/macro-paradise_2.10.3-2.0.0-SNAPSHOT.jar) [success] Total time: 0 s, completed Nov 28, 2013 11:07:12 AM > set disableMatcherExtras in ThisBuild := true [info] Defining {.}/*:disableMatcherExtras [info] The new value will be used by specs2-matcher-extra/*:libraryDependencies, specs2-matcher-extra/compile:sources, specs2-matcher-extra/test:sources [info] Reapplying settings... [info] Set current project to specs2 (in build file:/Users/jason/code/specs2/) > show specs2-matcher-extra/scalacOptions [info] Resolving org.fusesource.jansi#jansi;1.4 ... [info] Done updating. [info] List(-Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_, -Xlint, -deprecation, -unchecked, -feature, -language:_)
scalamacros/paradise#7 Also of great interest is how paradise, included only in specs-matchers-extra, is leaking into the compilers of other sub-projects.
Specs PR: etorreborre/specs2#217 |
The required functionality (quasiquites) is now part of the normal compiler. This has the nice effect of avoiding bugs like: scalamacros/paradise#7
The good news is that the standard 2.11 compiler is sufficient to build Specs; we just needed to conditionally disable macro-paradise. This shows that the effort to keep quasiquotes in from scala/scala in sync with those in paradise is worthwhile. |
Didn't we have binary compatibility shackles that prevented that? |
I think we're better off focusing our attentions on 2.11 at this point. |
What Jason said. |
Fixed in 22c6bad |
This code:
Leads to a cyclic error compiling Specs2 under Scala 2.11.0, which tries to initialize
sym.owner
if!currentRun.compiles(sym.owner)
.That check is buggy in the compiler.
Here's the error I saw:
Debug notes:
You could workaround this by checking for
!sym.owner.enclosingTopLevelClass.isRefinementClass
before you try to call that, and submit a patch to the compiler to fold this intoCurrentRun#compiles
.I noted another bug with
compiles
: https://issues.scala-lang.org/browse/SI-7758 that you should also try to guard against.The text was updated successfully, but these errors were encountered: