Merge pull request #8226 from eed3si9n/wip/scala-library

[1.x] scala-library 3.8.0 support
This commit is contained in:
eugene yokota 2025-08-22 18:40:14 -04:00 committed by GitHub
commit f0e3b5a2ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 22 additions and 10 deletions

View File

@ -93,11 +93,11 @@ jobs:
python-version: 3.12
- name: Coursier cache
uses: coursier/cache-action@v6
- name: Cache sbt
uses: actions/cache@v4
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
# - name: Cache sbt
# uses: actions/cache@v4
# with:
# path: ~/.sbt
# key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Setup Windows C++ toolchain
uses: ilammy/msvc-dev-cmd@v1
if: ${{ matrix.os == 'windows-latest' }}
@ -105,7 +105,6 @@ jobs:
if: ${{ matrix.jobtype == 1 }}
shell: bash
run: |
rm -rf "$HOME/.sbt/boot/" || true
./sbt -v --client mimaReportBinaryIssues
./sbt -v --client javafmtCheck
./sbt -v --client "Test/javafmtCheck"

View File

@ -268,9 +268,7 @@ object Defaults extends BuildCommon {
csrMavenProfiles :== Set.empty,
csrReconciliations :== LMCoursier.relaxedForAllModules,
csrMavenDependencyOverride :== false,
csrSameVersions := Seq(
ScalaArtifacts.Artifacts.map(a => InclExclRule(scalaOrganization.value, a)).toSet
),
csrSameVersions :== Nil,
stagingDirectory := (ThisBuild / baseDirectory).value / "target" / "sona-staging",
localStaging := Some(Resolver.file("local-staging", stagingDirectory.value)),
sonaBundle := Publishing
@ -3245,6 +3243,21 @@ object Classpaths {
(proj +: base).distinct
}
}).value,
csrSameVersions ++= {
partialVersion(scalaVersion.value) match {
// See https://github.com/sbt/sbt/issues/8224
// Scala 3.8+ should align only Scala3_8Artifacts
case Some((3, minor)) if minor >= 8 =>
ScalaArtifacts.Scala3_8Artifacts
.map(a => InclExclRule(scalaOrganization.value, a))
.toSet :: Nil
case Some((major, minor)) if major == 2 || major == 3 =>
ScalaArtifacts.Artifacts
.map(a => InclExclRule(scalaOrganization.value, a))
.toSet :: Nil
case _ => Nil
}
},
moduleName := normalizedName.value,
ivyPaths := IvyPaths(baseDirectory.value, bootIvyHome(appConfiguration.value)),
csrCacheDirectory := {

View File

@ -14,7 +14,7 @@ object Dependencies {
// sbt modules
private val ioVersion = nightlyVersion.getOrElse("1.10.5")
private val lmVersion =
sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("1.11.3")
sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("1.11.4")
val zincVersion = nightlyVersion.getOrElse("1.10.8")
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion