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
Version switch operator (++) doesn't work as expected on Scala 3 #6915
Comments
@ruippeixotog Thanks for the report. Your expectations matches mine. |
|
I was having a conversation with someone regarding the two
One aspect of 1.7.0 fuzzy matching is that it doesn't check for either backward or forward compatibility, and it only requires that the pattern matches a single Scala version out of This will also fix the |
Problem ------- Since sbt-doge merger `++ <sv> <command1>` has used binary compatibility as a test to select subproject, but it causes surprising situations like sbt#6915, and it blurs the responsibility of YAML file and build file as the version specified in the version can override the Scala version test on local laptop. Solution -------- This removes the compatibiliy check (backward-only or otherwise), and require that `<sv>` match one of `crossScalaVersions` using the new Semantic Version selector pattern.
steps
Consider the following sample project on sbt 1.6.2:
Try running
sbt "++3.0.2 compile"
.problem
The compilation fails as sbt tries to build
subproj
.expectation
I didn't expect
++3.0.2
to compilesubproj
, since it doesn't include a 3.0.x version in its cross-versions. In general, subprojects declaring Scala 3.1 as their Scala version can't be expected to compile successfully against Scala 3.0.x versions.notes
This is an important use case for module-based projects like PureConfig. We want to compile PureConfig modules against the minimum possible Scala version to ensure maximum compatibility and we rely on
++
on CI and on our automated publishing process.The text was updated successfully, but these errors were encountered: