-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[CLI] Set Move 2 as default in Aptos CLI and add move-1
flag
#15431
base: main
Are you sure you want to change the base?
Conversation
⏱️ 1h 13m total CI duration on this PR
|
f2cbfa0
to
66949be
Compare
66949be
to
072f8a1
Compare
move-1
flagmove-1
flag
crates/aptos/src/common/types.rs
Outdated
@@ -1163,25 +1164,33 @@ pub struct MovePackageDir { | |||
|
|||
/// ...or --compiler COMPILER_VERSION | |||
/// Specify the version of the compiler. | |||
/// Defaults to `1`, unless `--move-2` is selected. | |||
/// Defaults to the latest stable compiler version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps note that this is (at least 2)
, since if you're not a compiler developer you don't know that 2 is stable.
crates/aptos/src/common/types.rs
Outdated
verbatim_doc_comment)] | ||
pub compiler_version: Option<CompilerVersion>, | ||
|
||
/// ...or --language LANGUAGE_VERSION | ||
/// Specify the language version to be supported. | ||
/// Defaults to `1`, unless `--move-2` is selected. | ||
/// Defaults to the latest stable language version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again here, note (at least 2)
.
#[clap(long, value_parser = clap::value_parser!(CompilerVersion), | ||
alias = "compiler", | ||
default_value = LATEST_STABLE_COMPILER_VERSION, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to address #14441 and close it with this PR.
default_value_if("move_2", "true", LATEST_STABLE_COMPILER_VERSION), | ||
default_value_if("move_1", "true", "1"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we also (at least manually) test: aptos move test
and coverage, with: (a) --move-2, (b) --move-1, (c) neither. (a) and (c) should not panic on `MVC_BLOCK_V1=1, whereas (b) should.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
072f8a1
to
b05cbeb
Compare
@@ -909,7 +909,6 @@ impl IncludedArtifacts { | |||
experiments.append(&mut move_options.experiments.clone()); | |||
experiments.append(&mut more_experiments); | |||
|
|||
// TODO(#14441): Remove `None |` here when we update default CompilerVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is removed because LATEST_STABLE_COMPILER_VERSION
is set as the default value cc @brmataptos @vineethk
Description
This PR
aptos governance
.--move-1
flag to use Compiler v1 and Move 1.Note that for the command
aptos governance
,--move-2
is still required for using Move 2.Close #14441
How Has This Been Tested?
Manually test
aptos move compile
andaptos move publish
will compile and publish modules generated by compiler v2.Manually test
aptos move compile --move-1
andaptos move publish --move-1
will compile and publish modules generated by compiler v1.Manually test
aptos move compile --move-2
andaptos move publish --move-2
will compile and publish modules generated by compiler v2.Manually test
aptos move test
with: (a) --move-2, (b) --move-1, (c) neither. (a) and (c) does not panic onMVC_BLOCK_V1=1
while (b) does.Key Areas to Review
Whether this change covers all the use cases of using the compiler except for governance.
Type of Change
Which Components or Systems Does This Change Impact?
Checklist