Skip to content

Conversation

adpi2
Copy link
Member

@adpi2 adpi2 commented Jun 9, 2021

Use the exact list of compiler jars in the cache key of the compiler class loader. This makes the cache more reliable for someone who creates its own Scala instance, as in scala/scala3#12771.

@eed3si9n
Copy link
Member

eed3si9n commented Jun 9, 2021

The comment says "// It should be compilerJars but it would break on 3.0.0-M2 because of", and it broke the scripted test:

[info] Running compiler-project/scala3-tasty-management
[info] [error] ## Exception when compiling 2 sources to /tmp/sbt_76d84352/target/scala-3.0.0-M2/classes
[info] [error] java.lang.NoClassDefFoundError: scala/runtime/Nothing$
[info] [error] xsbt.CachedCompilerImpl.run(CachedCompilerImpl.java:65)
[info] [error] xsbt.CompilerInterface.run(CompilerInterface.java:41)

Maybe this should be in sbt 1.6.x?

@adpi2 adpi2 force-pushed the fix-mkScalaInstance branch from bc4e022 to 10f2ad2 Compare June 10, 2021 07:31
@adpi2
Copy link
Member Author

adpi2 commented Jun 10, 2021

The problem with M2 is fixed in M3 and subsequent versions. So this PR could be merged in 1.5.x, but there is no urgent reason to do so. I let you decide.

@adpi2 adpi2 force-pushed the fix-mkScalaInstance branch from 10f2ad2 to b6b4ca0 Compare June 11, 2021 07:51
@adpi2 adpi2 force-pushed the fix-mkScalaInstance branch from b6b4ca0 to 75a55a1 Compare June 11, 2021 08:41
@adpi2 adpi2 requested a review from eed3si9n June 11, 2021 09:25
@eed3si9n eed3si9n added this to the 1.5.4 milestone Jun 11, 2021
Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with releasing this as 1.5.x, but we should include it as a breaking change since some people's build matrix may include 3.0.0-M2, even if it's no longer relevant.

@eed3si9n eed3si9n merged commit a9402a6 into sbt:develop Jun 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants