-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Enable MiMa in the new build #23910
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
Enable MiMa in the new build #23910
Changes from all commits
a52fbf1
16be37d
f66baf4
b6e36d8
df82900
b301b8c
7b3fd49
40c58ee
101e655
e274d0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,23 @@ jobs: | |
- name: Compile `scala3-library-nonbootstrapped` | ||
run: ./project/scripts/sbt scala3-library-nonbootstrapped/compile | ||
|
||
scala3-interfaces: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v5 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v5 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
cache: 'sbt' | ||
|
||
- uses: sbt/setup-sbt@v1 | ||
- name: Compile `scala3-interfaces` | ||
run: ./project/scripts/sbt scala3-interfaces/compile | ||
|
||
tasty-core-nonbootstrapped: | ||
runs-on: ubuntu-latest | ||
needs: [scala3-library-nonbootstrapped] | ||
|
@@ -67,7 +84,7 @@ jobs: | |
|
||
scala3-compiler-nonbootstrapped: | ||
runs-on: ubuntu-latest | ||
needs: [tasty-core-nonbootstrapped, scala3-library-nonbootstrapped] | ||
needs: [tasty-core-nonbootstrapped, scala3-library-nonbootstrapped, scala3-interfaces] | ||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v5 | ||
|
@@ -155,7 +172,7 @@ jobs: | |
|
||
scala3-compiler-bootstrapped: | ||
runs-on: ubuntu-latest | ||
needs: [tasty-core-bootstrapped, scala3-library-bootstrapped] | ||
needs: [tasty-core-bootstrapped, scala3-library-bootstrapped, scala3-interfaces] | ||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v5 | ||
|
@@ -280,6 +297,100 @@ jobs: | |
- name: Compile `scaladoc` | ||
run: ./project/scripts/sbt scaladoc-new/compile | ||
|
||
################################################################################################# | ||
########################################### MiMa JOBS ########################################### | ||
################################################################################################# | ||
|
||
mima-scala-library-nonbootstrapped: | ||
runs-on: ubuntu-latest | ||
needs: scala-library-nonbootstrapped | ||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v5 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v5 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
cache: 'sbt' | ||
|
||
- uses: sbt/setup-sbt@v1 | ||
- name: Report MiMa issues in `scala-library-nonbootstrapped` | ||
run: ./project/scripts/sbt scala-library-nonbootstrapped/mimaReportBinaryIssues | ||
Comment on lines
+304
to
+320
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we either don't use build cache of it's misconfigured becouse in the last run scala-library is built at least twice: once in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
mima-scala3-interfaces: | ||
runs-on: ubuntu-latest | ||
needs: scala3-interfaces | ||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v5 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v5 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
cache: 'sbt' | ||
|
||
- uses: sbt/setup-sbt@v1 | ||
- name: Report MiMa issues in `scala3-interfaces` | ||
run: ./project/scripts/sbt scala3-interfaces/mimaReportBinaryIssues | ||
|
||
mima-tasty-core-nonbootstrapped: | ||
runs-on: ubuntu-latest | ||
needs: tasty-core-nonbootstrapped | ||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v5 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v5 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
cache: 'sbt' | ||
|
||
- uses: sbt/setup-sbt@v1 | ||
- name: Report MiMa issues in `tasty-core-nonbootstrapped` | ||
run: ./project/scripts/sbt tasty-core-nonbootstrapped/mimaReportBinaryIssues | ||
|
||
mima-scala-library-bootstrapped: | ||
runs-on: ubuntu-latest | ||
needs: scala-library-bootstrapped | ||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v5 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v5 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
cache: 'sbt' | ||
|
||
- uses: sbt/setup-sbt@v1 | ||
- name: Report MiMa issues in `scala-library-bootstrapped` | ||
run: ./project/scripts/sbt scala-library-bootstrapped/mimaReportBinaryIssues | ||
|
||
mima-tasty-core-bootstrapped: | ||
runs-on: ubuntu-latest | ||
needs: tasty-core-bootstrapped | ||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v5 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v5 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
cache: 'sbt' | ||
|
||
- uses: sbt/setup-sbt@v1 | ||
- name: Report MiMa issues in `tasty-core-bootstrapped` | ||
run: ./project/scripts/sbt tasty-core-bootstrapped-new/mimaReportBinaryIssues | ||
|
||
################################################################################################# | ||
########################################### TEST JOBS ########################################### | ||
################################################################################################# | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,7 +134,7 @@ object Build { | |
* - `3.M.0` if `P > 0` | ||
* - `3.(M-1).0` if `P = 0` | ||
*/ | ||
val mimaPreviousDottyVersion = "3.7.0" | ||
val mimaPreviousDottyVersion = "3.7.3" // for 3.8.0, we compare against 3.7.3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is fine since we only compare backward compatibility, not forward. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this change needed? Is it because of merging Scala 2.13 stdlib into this repo? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could call the fat jar |
||
|
||
/** LTS version against which we check binary compatibility. | ||
* | ||
|
@@ -304,6 +304,7 @@ object Build { | |
Test / develocityBuildCacheClient := None, | ||
extraDevelocityCacheInputFiles := Seq.empty, | ||
extraDevelocityCacheInputFiles / outputFileStamper := FileStamper.Hash, | ||
resolvers += ("Artifactory" at "https://repo.scala-lang.org/artifactory/fat-jar/"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be able to use MiMa, I created a fat jar that contains both Scala 3.7.3 and Scala 2.13.16 manually and pushed it to this resolver. Once we publish 3.8.0, we can tear down this system and compare against the artifacts from Maven Central. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's add TODO notes to related changes that would need to be adjusted (resolvers, mimaPreviousArtifacts, etc) |
||
) | ||
|
||
// Settings shared globally (scoped in Global). Used in build.sbt | ||
|
@@ -1636,6 +1637,16 @@ object Build { | |
publish / skip := false, | ||
// Project specific target folder. sbt doesn't like having two projects using the same target folder | ||
target := target.value / "scala-library-nonbootstrapped", | ||
// Add configuration for MiMa | ||
mimaCheckDirection := (compatMode match { | ||
case CompatMode.BinaryCompatible => "backward" | ||
case CompatMode.SourceAndBinaryCompatible => "both" | ||
}), | ||
mimaExcludeAnnotations += "scala.annotation.experimental", | ||
mimaPreviousArtifacts += ("org.scala-lang" % "fat-stdlib" % "3.7.3"), | ||
mimaForwardIssueFilters := MiMaFilters.Scala3Library.ForwardsBreakingChanges, | ||
mimaBackwardIssueFilters := MiMaFilters.Scala3Library.BackwardsBreakingChanges, | ||
customMimaReportBinaryIssues("MiMaFilters.Scala3Library"), | ||
) | ||
|
||
/* Configuration of the org.scala-lang:scala3-library_3:*.**.**-nonbootstrapped project */ | ||
|
@@ -1748,6 +1759,16 @@ object Build { | |
scalaCompilerBridgeBinaryJar := { | ||
Some((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value) | ||
}, | ||
// Add configuration for MiMa | ||
mimaCheckDirection := (compatMode match { | ||
case CompatMode.BinaryCompatible => "backward" | ||
case CompatMode.SourceAndBinaryCompatible => "both" | ||
}), | ||
mimaExcludeAnnotations += "scala.annotation.experimental", | ||
mimaPreviousArtifacts += ("org.scala-lang" % "fat-stdlib" % "3.7.3"), | ||
mimaForwardIssueFilters := MiMaFilters.Scala3Library.ForwardsBreakingChanges, | ||
mimaBackwardIssueFilters := MiMaFilters.Scala3Library.BackwardsBreakingChanges, | ||
customMimaReportBinaryIssues("MiMaFilters.Scala3Library"), | ||
) | ||
|
||
/* Configuration of the org.scala-lang:scala3-library_3:*.**.**-bootstrapped project */ | ||
|
@@ -1952,6 +1973,7 @@ object Build { | |
/* Configuration of the org.scala-lang:tasty-core_3:*.**.**-nonbootstrapped project */ | ||
lazy val `tasty-core-nonbootstrapped` = project.in(file("tasty")) | ||
.dependsOn(`scala3-library-nonbootstrapped`) | ||
.settings(commonMiMaSettings) | ||
.settings( | ||
name := "tasty-core-nonbootstrapped", | ||
moduleName := "tasty-core", | ||
|
@@ -2005,13 +2027,16 @@ object Build { | |
Test / envVars ++= Map( | ||
"EXPECTED_TASTY_VERSION" -> expectedTastyVersion, | ||
), | ||
|
||
mimaForwardIssueFilters := MiMaFilters.TastyCore.ForwardsBreakingChanges, | ||
mimaBackwardIssueFilters := MiMaFilters.TastyCore.BackwardsBreakingChanges, | ||
customMimaReportBinaryIssues("MiMaFilters.TastyCore"), | ||
) | ||
|
||
/* Configuration of the org.scala-lang:tasty-core_3:*.**.**-bootstrapped project */ | ||
lazy val `tasty-core-bootstrapped-new` = project.in(file("tasty")) | ||
.dependsOn(`scala3-library-bootstrapped-new`) | ||
.settings(publishSettings) | ||
.settings(commonMiMaSettings) | ||
.settings( | ||
name := "tasty-core-bootstrapped", | ||
moduleName := "tasty-core", | ||
|
@@ -2074,6 +2099,9 @@ object Build { | |
Test / envVars ++= Map( | ||
"EXPECTED_TASTY_VERSION" -> expectedTastyVersion, | ||
), | ||
mimaForwardIssueFilters := MiMaFilters.TastyCore.ForwardsBreakingChanges, | ||
mimaBackwardIssueFilters := MiMaFilters.TastyCore.BackwardsBreakingChanges, | ||
customMimaReportBinaryIssues("MiMaFilters.TastyCore"), | ||
) | ||
|
||
// ============================================================================================== | ||
|
@@ -3467,18 +3495,6 @@ object Build { | |
val doWork = (Compile/doc).result.value | ||
(Compile/doc/target).value | ||
}, | ||
commonMiMaSettings, | ||
mimaPreviousArtifacts += { | ||
val thisProjectID = projectID.value | ||
val crossedName = thisProjectID.crossVersion match { | ||
case cv: Disabled => thisProjectID.name | ||
case cv: Binary => s"${thisProjectID.name}_${cv.prefix}3${cv.suffix}" | ||
} | ||
(thisProjectID.organization % crossedName % mimaPreviousLTSDottyVersion) | ||
}, | ||
mimaForwardIssueFilters := MiMaFilters.Scala3Library.ForwardsBreakingChanges, | ||
mimaBackwardIssueFilters := MiMaFilters.Scala3Library.BackwardsBreakingChanges, | ||
customMimaReportBinaryIssues("MiMaFilters.Scala3Library"), | ||
) | ||
} else base | ||
} | ||
|
@@ -3493,14 +3509,6 @@ object Build { | |
Test / envVars ++= Map( | ||
"EXPECTED_TASTY_VERSION" -> expectedTastyVersion, | ||
), | ||
if (mode == Bootstrapped) Def.settings( | ||
commonMiMaSettings, | ||
mimaForwardIssueFilters := MiMaFilters.TastyCore.ForwardsBreakingChanges, | ||
mimaBackwardIssueFilters := MiMaFilters.TastyCore.BackwardsBreakingChanges, | ||
customMimaReportBinaryIssues("MiMaFilters.TastyCore"), | ||
) else { | ||
Nil | ||
} | ||
) | ||
|
||
def asTastyCoreScala2: Project = project | ||
|
Uh oh!
There was an error while loading. Please reload this page.