Skip to content
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

[CI][Compiler-v2] add MOVE_LANGUAGE_V2=true to move_pr.sh #15309

Merged
merged 1 commit into from
Nov 19, 2024
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
1 change: 1 addition & 0 deletions aptos-move/e2e-move-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ pub(crate) fn build_package_with_compiler_version(
compiler_version: CompilerVersion,
) -> anyhow::Result<BuiltPackage> {
let mut options = options;
options.language_version = Some(compiler_version.infer_stable_language_version());
options.compiler_version = Some(compiler_version);
BuiltPackage::build(package_path.to_owned(), options)
}
9 changes: 9 additions & 0 deletions third_party/move/move-model/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,15 @@ impl CompilerVersion {
_ => Ok(()),
}
}

/// Infer the latest stable language version based on the compiler version
pub fn infer_stable_language_version(&self) -> LanguageVersion {
if *self == CompilerVersion::V1 {
LanguageVersion::V1
} else {
LanguageVersion::latest_stable()
}
}
}

// ================================================================================'
Expand Down
4 changes: 2 additions & 2 deletions third_party/move/scripts/move_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ if [ ! -z "$COMPILER_V2_TEST" ]; then
echo "*************** [move-pr] Running integration tests with compiler v2"
(
cd $BASE
MVC_DOCGEN_OUTPUT_DIR=tests/compiler-v2-doc MOVE_COMPILER_V2=true cargo build $CARGO_OP_PARAMS \
MVC_DOCGEN_OUTPUT_DIR=tests/compiler-v2-doc MOVE_COMPILER_V2=true MOVE_LANGUAGE_V2=true cargo build $CARGO_OP_PARAMS \
$MOVE_CRATES_V2_ENV_DEPENDENT
MVC_DOCGEN_OUTPUT_DIR=tests/compiler-v2-doc \
MOVE_COMPILER_V2=true cargo nextest run $CARGO_NEXTEST_PARAMS \
MOVE_COMPILER_V2=true MOVE_LANGUAGE_V2=true cargo nextest run $CARGO_NEXTEST_PARAMS \
$MOVE_CRATES_V2_ENV_DEPENDENT
)
fi
Expand Down
Loading