-
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.
Test stdlib-bootstrapped TASTy-MiMa in CI (#18158)
This addition does have some fragility with the current TASTy numbering scheme. The test script will change the TASTy version and recompile the compiler and library with this version to allow TASTy MiMa to read those files. When we change to a new major version, there is the potential for this TASTy to not be readable from the latest release of TASTy MiMa. In that scenario, we would disable this test until a new version of TASTy MiMa is published.
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
set -eux | ||
|
||
source $(dirname $0)/cmdTestsCommon.inc.sh | ||
|
||
TASTY_FROMAT_FILE="tasty/src/dotty/tools/tasty/TastyFormat.scala" | ||
MINOR_TASTY_VERSION_SUPPORTED_BY_TASTY_MIMA=3 | ||
MINOR_TASTY_VERSION=$(grep -oE 'val MinorVersion: Int = ([0-9]+)' $TASTY_FROMAT_FILE | grep -oE '[0-9]+') | ||
EXPERIMENTAL_TASTY_VERSION=$(grep -oE 'val ExperimentalVersion: Int = ([0-9]+)' $TASTY_FROMAT_FILE | grep -oE '[0-9]+') | ||
|
||
setTastyVersion() { | ||
sed -i -E -e "s/val MinorVersion: Int = [0-9]+/val MinorVersion: Int = $1/" -e "s/val ExperimentalVersion: Int = [0-9]+/val ExperimentalVersion: Int = $2/" $TASTY_FROMAT_FILE | ||
} | ||
|
||
setTastyVersion $MINOR_TASTY_VERSION_SUPPORTED_BY_TASTY_MIMA 0 | ||
|
||
# Run stdlib-bootstrapped/tastyMiMaReportIssues using a custom TASTy version. | ||
# We clean before to make sure all sources are recompiled using the new TASTY version. | ||
# We clean after to make sure no other test will use the TASTy generated with this version. | ||
"$SBT" "clean; stdlib-bootstrapped/clean; reload; stdlib-bootstrapped/tastyMiMaReportIssues; clean; stdlib-bootstrapped/clean" | ||
|
||
setTastyVersion $MINOR_TASTY_VERSION $EXPERIMENTAL_TASTY_VERSION |