-
Notifications
You must be signed in to change notification settings - Fork 1.1k
The example in the "Multi-Stage Programming" document does not compile #7897
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
It does work on master and with https://github.com/lampepfl/dotty-staging.g8. This is probably an issue in Scastie. I noticed that Scastie is still using |
Update to |
It still fails with sbt-dotty 0.3.4: https://scastie.scala-lang.org/BUGFYfWmStuS5I6Nlo034w @nicolasstucki can you confirm that a Dotty project executed from within sbt does work? |
this seems sbt related with sbt 1.2.8 i get a compile error: |
Then my guess is that we do not get the correct class path for the scala lib within the forked VM. I will investigate. |
@nicolasstucki it works fine with fork, perhaps it's something to do with new layered classloaders in sbt 1.3, dunno |
The bug is most likely here. |
Indeed, the |
sbt 1.3 introduced the `sbt.internal.LayeredClassLoader` which is a `URLClassloader` which layers the classpath into different Classloaders. To make sure we recover `scala-library-XYZ.jar` we need to get the URLs from the parent classloaders as well.
* Make classpathFromClassloader non quadratic * Use `java.class.path` as a fallback path
The tests ensure that we've fixed scala#7897.
The tests ensure that we've fixed scala#7897. Co-Authored-By: Guillaume Martres <[email protected]>
The tests ensure that we've fixed scala#7897. Co-Authored-By: Guillaume Martres <[email protected]>
The tests ensure that we've fixed scala#7897. Co-Authored-By: Guillaume Martres <[email protected]>
minimized code
The following example is simplified from https://dotty.epfl.ch/docs/reference/metaprogramming/staging.html
https://scastie.scala-lang.org/4ZJ45FiQQLO9xZ0R2IFCSw
Stack trace
The text was updated successfully, but these errors were encountered: