Skip to content

Commit f7e6c4c

Browse files
committed
Adapt checkReleasedTastyVersion to LTS series - nightlies of LTS are released using stable TASTy version
1 parent bf9e225 commit f7e6c4c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

project/Build.scala

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ object Build {
146146
}
147147

148148
// LTS or Next
149-
val versionLine = "LTS"
149+
final val versionLine = "LTS"
150150

151151
// Versions used by the vscode extension to create a new project
152152
// This should be the latest published releases.
@@ -2119,19 +2119,22 @@ object Build {
21192119
case Array("28", minor, "experimental", _) => (minor.toInt, true)
21202120
case other => sys.error(s"Invalid TASTy version string: $expectedTastyVersion")
21212121
}
2122+
val isLTS = versionLine == "LTS"
21222123

21232124
if(isNightly) {
2124-
assert(tastyIsExperimental, "TASTY needs to be experimental in nightly builds")
2125+
assert(tastyIsExperimental || isLTS, "TASTY needs to be experimental in nightly builds")
21252126
val expectedTastyMinor = version.patch match {
21262127
case 0 => version.minor
21272128
case 1 if referenceV.patch == 0 && referenceV.isRC =>
21282129
// Special case for a period when reference version is a new unstable minor
21292130
// Needed for non_bootstrapped tests requiring either stable tasty or the same experimental version produced by both reference and bootstrapped compiler
21302131
assert(version.minor == referenceV.minor, "Expected reference and base version to use the same minor")
21312132
version.minor
2132-
case _ => version.minor + 1
2133+
case _ =>
2134+
if (isLTS) version.minor
2135+
else version.minor + 1
21332136
}
2134-
assert(tastyMinor == expectedTastyMinor, "Invalid TASTy minor version")
2137+
assert(tastyMinor == expectedTastyMinor, s"Invalid TASTy minor version, expected $expectedTastyMinor, got $tastyMinor")
21352138
}
21362139

21372140
if(isRelease) {

0 commit comments

Comments
 (0)