-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update reference, MiMa previous version and sync TASTy version (#22187)
* Update reference version to 3.6.3-RC1 (from 3.6.0) * Update mima previous binary verison to 3.6.2 (instead of unofficial 3.6.1) * Set TASTy version to `28.7-experimental-1` - it should have been set when branching of 3.6.3. * We now document better how and when tasty version should be set * Add additional runtime test to ensure we don't emit invalid TASTy version during Release / NIGHTLY releases and the expected version set in build matches version defined in TastyFormat
- Loading branch information
1 parent
91063dd
commit 7441791
Showing
3 changed files
with
85 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package dotty.tools.tasty | ||
|
||
import org.junit.Assert._ | ||
import org.junit.Test | ||
|
||
import TastyBuffer._ | ||
|
||
// Tests ensuring TASTY version emitted by compiler is matching expected TASTY version | ||
class BuildTastyVersionTest { | ||
|
||
val CurrentTastyVersion = TastyVersion(TastyFormat.MajorVersion, TastyFormat.MinorVersion, TastyFormat.ExperimentalVersion) | ||
|
||
// Needs to be defined in build Test/envVars | ||
val ExpectedTastyVersionEnvVar = "EXPECTED_TASTY_VERSION" | ||
|
||
@Test def testBuildTastyVersion(): Unit = { | ||
val expectedVersion = sys.env.get(ExpectedTastyVersionEnvVar) | ||
.getOrElse(fail(s"Env variable $ExpectedTastyVersionEnvVar not defined")) | ||
.match { | ||
case s"$major.$minor-experimental-$experimental" => TastyVersion(major.toInt, minor.toInt, experimental.toInt) | ||
case s"$major.$minor" if minor.forall(_.isDigit) => TastyVersion(major.toInt, minor.toInt, 0) | ||
case other => fail(s"Invalid TASTY version string: $other") | ||
} | ||
assertEquals(CurrentTastyVersion, expectedVersion) | ||
} | ||
} |