Skip to content

Test stdlib-bootstrapped TASTy-MiMa in CI #18158

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

Merged
merged 1 commit into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ jobs:
run: |
./project/scripts/sbt ";scala3-interfaces/mimaReportBinaryIssues ;scala3-library-bootstrapped/mimaReportBinaryIssues ;scala3-library-bootstrappedJS/mimaReportBinaryIssues; tasty-core-bootstrapped/mimaReportBinaryIssues; stdlib-bootstrapped/mimaReportBinaryIssues"

- name: TASTy MiMa
Copy link
Contributor Author

@nicolasstucki nicolasstucki Jul 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This takes around 5 minutes (normal MiMa takes 6 minutes). An alternative to this would be to create a new ci job that only executes on nightly or with a flag. Currently, I am the only one doing changes that require these tests and it might not be worth on each PR.

run: |
# This script cleans the compiler and recompiles it from scratch (keep as last run)
./project/scripts/stdlib-bootstrapped-tasty-mima.sh

community_build_a:
runs-on: [self-hosted, Linux]
container:
Expand Down
22 changes: 22 additions & 0 deletions project/scripts/stdlib-bootstrapped-tasty-mima.sh
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