-
Notifications
You must be signed in to change notification settings - Fork 939
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
Manage Scala 3 instances and fetch compiler bridges #6206
Conversation
@eed3si9n How can I get the CI to run against the latest |
@adpi2 Not possible now, but it shouldn't be too hard to tweak https://github.com/sbt/sbt/blob/develop/.github/workflows/nightly.yml or copy-paste it and adding a |
d28867d
to
5b886cc
Compare
@eed3si9n Thanks for publishing I changed the CI of this PR to make it run on fresh
Do you know how I can force the scripted tests to use the user ivy cache? |
In fact, it seems that my ivy cache problem is due to the settings of some particular scripted test and not to scripted tests in general: For instance in
overrides the user global cache. |
I adapted those tests with scalaCompilerBridgeResolvers += userLocalFileResolver(appConfiguration.value)
// use the user local resolver to fetch the SNAPSHOT version of the compiler-bridge
def userLocalFileResolver(appConfig: AppConfiguration): Resolver = {
val ivyHome = appConfig.provider.scalaProvider.launcher.ivyHome
Resolver.file("User Local", ivyHome / "local")(Resolver.defaultIvyPatterns)
} and it works! |
This is ready for review! The |
For now I have just created an issue in the Coursier repository about |
I'm not sure I understand what that means, will the sbt setting |
Oh oops, I read the description but missed the comment where you mentioned coursier/coursier#1933 which I guess is the follow-up. |
So yes the The only thing that is different with Also I think that choosing a custom |
It's something we'll have to figure out at some point, there's an issue open on that subject: scala/scala3#10146 |
Do we know why things are failing on AppVeyor?
|
@eed3si9n I need a release of zinc that contains sbt/zinc#956 |
@adpi2 Let me get on that. |
Contrary to Scala 2, Scala 3 compiler bridges are tied to the compiler version. There is one compiler bridge foreach compiler version. Scala compiler bridges are pure java so they are binary compatible with all Scala version. Consequently, we can fetch the binary module directly without using the ZincCompilerBridgeProvider.
Part of #6080
Depends on sbt/librarymanagement#350
Manage Scala 3 instances
When Scala version is Scala 3:
scala3-compiler
artifact is added to the list of tool dependencies.scala3-compiler
transitively depends onscala3-library
andscala-library
autoScalaLibrary := true
, thescala3-library
is added to the list of library dependenciesCoursier does not handle
autoScalaLibrary
properly with Scala 3. But we don't really need to setautoScalaLibrary = true
in the Coursier configuration becausesbt
already add the proper scala library to the list of dependencies.Fetch the Scala 3 compiler bridge binaries
Contrary to Scala 2, the Scala 3 compiler bridges are tied to the compiler versions. There is a single compiler bridge for each compiler version. Also they are pure java so binary compatible with all Scala versions.
Consequently, we can fetch the binary module directly without using the
ZincCompilerBridgeProvider
.Manage the .tasty files
This PR introduces an
auxiliaryClassFiles
setting that is passed to Zinc viaincOptions
.When the Scala version is Scala 3, the
auxiliaryClassFiles
setting contains theTastyFiles
singleton. Otherwise it is empty.One can add more
auxiliaryClassFiles
with, for example,auxiliaryClassFiles += ScalaJSFiles.instance