You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[build] Refine checkReleasedTastyVersion logic to handle using unstable reference version of a new minor (#22789)
In #22786 we've followed the process and updated referenceVersion to
latest released version which happens to be 3.7.0-RC1 producing TASTY
`28.7-experimental-1`.
All nightly version when patch > 0 should be using TASTy version
incremented by 1, in case of unexpected binary breakage. However
non-bootstrapped tests (eg. FromTastyTest) would fail if we'd increase
tasty version to `28.8-experimental-1` because these require the
produced and consumed Scala files (eg. in `FromTastyTest`) to either:
- be produced by older stable compiler
- produced with exactly the same TASTy version
Because of that we're adding special case to checking version of
released tasty to allow using the same tasty format as unstable
reference version if the reference version is the RC release of new
minor (patch == 0)
Fixes#22788
[skip ci]
// Special case for a period when reference version is a new unstable minor
2557
+
// Needed for non_bootstrapped tests requiring either stable tasty or the same experimental version produced by both reference and bootstrapped compiler
2558
+
assert(version.minor == referenceV.minor, "Expected reference and base version to use the same minor")
2559
+
version.minor
2560
+
case _ => version.minor +1
2561
+
}
2551
2562
assert(tastyMinor == expectedTastyMinor, "Invalid TASTy minor version")
2552
2563
}
2553
2564
2554
2565
if(isRelease) {
2555
-
assert(scalaMinor == tastyMinor, "Minor versions of TASTY vesion and Scala version should match in release builds")
2556
-
if (scalaIsRC && scalaPatch ==0)
2566
+
assert(version.minor == tastyMinor, "Minor versions of TASTY vesion and Scala version should match in release builds")
2567
+
assert(!referenceV.isRC, "Stable release needs to use stable compiler version")
2568
+
if (version.isRC && version.patch ==0)
2557
2569
assert(tastyIsExperimental, "TASTy should be experimental when releasing a new minor version RC")
2558
2570
else
2559
2571
assert(!tastyIsExperimental, "Stable version cannot use experimental TASTY")
0 commit comments