-
Notifications
You must be signed in to change notification settings - Fork 14
macro regression in 2.12.5 when compiling on Java 9 or 10 ("macro implementation not found") #480
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
Comments
another, perhaps related report on Gitter from @plokhotnyuk compiling https://github.com/Sizmek/fast-string-interpolator on 2.12.5 and Java 9 gives
|
I was going to say it's most likely the macro/plugin classloader change (scala/scala#6314 / scala/scala#6400 / scala/scala#6412), but looking at the diffs, the code path with the cache disabled (whch ist the default) seems to be identical. |
It's because the classpath that it's looking at uses The salient line is in val locations = classpath.map(u => Path(AbstractFile.getURL(u).file)) |
But it seems to me |
It's only used in that case, but it's computed always. The cheap fix is probably to make it The slightly more generous fix is to intermediately map only |
Ah, then |
I have a fix on the way, thanks Harrison for the preliminary investigation. I'm not going to fix the fact that |
Fixes scala/scala-dev#480. It reports whenever `AbstractFile.getUrl` returns `null` if verbose is enabled.
The same with https://github.com/lightbend/scala-logging:
|
yeah, I think we can expect any macro to be affected. |
Stepped on this as well using scalatest, @dotta can provide more info. |
Indeed. I don't have a reproducible, but if you manage to have a non-existing directory as part of the computed classpath, then |
Fixes scala/scala-dev#480. It reports whenever `AbstractFile.getUrl` returns `null` if verbose is enabled.
Just adding that I stumbled upon this problem with utest. |
This is causing Scala test to fail
|
Fixed tests for Scala 2.12.X. This included: * Removing mocking from the tests * Refreshing dependencies * Removing support for Scala 2.10.X Note, this release also ensures we run with Java 8 due to the following issue with macros: scala/scala-dev#480
Fixes scala/scala-dev#480. It reports whenever `AbstractFile.getUrl` returns `null` if verbose is enabled.
Fixes scala/scala-dev#480. It reports whenever `AbstractFile.getUrl` returns `null` if verbose is enabled. [cherry-picked from 957780f after this was accidentally discarding in scala#6575]
It still happens for me in 2.12.6 when compiling in IntelliJ IDEA (sbt 1.1.6) with circe json library. It compiles from commandline sbt compile though. |
@unoexperto whatever problem you're having, I very much doubt it can have anything to do with this ticket besides happening to share an error message |
EDIT: Adding bug description here at the top now that we know more about it, and since lots of people are hitting this:
====
original report follows:
on Java 9 https://gist.github.com/SethTisue/0681f6aa70662ecde47a4a842ed13fb6 gives
reported on Gitter by @CremboC
The text was updated successfully, but these errors were encountered: