Ólafur Páll Geirsson
Ólafur Páll Geirsson
This is no longer an issue in Scalafix since we use `GlobalSymbolTable` without caching or indexing.
This is no longer an issue in Scalafix since we use `GlobalSymbolTable` without caching or indexing.
I propose to close this ticket as "Fixed" since `GlobalSymbolTable` respected shadowed classpath definitions the same way as scala-compiler.
Thank you for reporting! It's good to know there is a workaround. cc/ @fehu is this something you could take a look at?
Thank you for reporting! The Java installation is discovered through the `coursier java-home` command, as implemented here https://github.com/scalameta/sbt-native-image/blob/9cee2c1d066d7d737cd4081164622b2fd27d9f3f/plugin/src/main/scala/sbtnativeimage/NativeImagePlugin.scala#L168-L173 The version 21.0.0 does not support M1, it seems like you need...
Thank you for reporting! Can you confirm that `--initialize-at-run-time=scala.util.Random$` fixes the problem? We can certainly enable something like that by default in this plugin.
@metasim What is the difference between this feature and something like here below? ```` ```tut:silent val init = baz.Example() import init._ ``` ```` assuming that `baz.Example` is on your classpath
I think I see what you mean. Yes, my workaround is insufficient if you want to inline the declarations. However, building on top of line numbers seems fragile and cryptic...
I hit on the same issue and was able to work around it with the steps here https://github.com/scala/bug/issues/11634#issuecomment-670386111
We could publish a re-usable library that provides the native-image substitutions but I am not sure if it would work with any native-image version. Worst case, I suppose we could...