-
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
Conversation
⏱️ 1h 13m total CI duration on this PR
|
f2cbfa0
to
66949be
Compare
66949be
to
072f8a1
Compare
move-1
flagmove-1
flag
072f8a1
to
b05cbeb
Compare
b05cbeb
to
c1a821b
Compare
c1a821b
to
20faae0
Compare
9b6983d
to
2f9e3bb
Compare
987f4de
to
3618442
Compare
skip_attribute_checks: false, | ||
check_test_code: false, | ||
move_2: false, | ||
move_2: true, | ||
move_1: false, |
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.
Should there be a move_version field that takes an enum instead? Because I assume it's invalid to set both to true or false?
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.
Agree, but perhaps we should have either just keep this as move_2
with true the default, or remove one of the flags. Enum seems overkill.
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.
Hi @banool, I was thinking of the same idea but we may still need to keep the move-2
flag in case some eco system projects depend on this flag to compile their smart contracts in CI? Enum seems be an overkill because move-1
will only be used in urgent time and will be removed when V1 retires. Also, external users cannot set both of them to the same value because they are put in the same ArgGroup.
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.
Approve modulo addressing comments
skip_attribute_checks: false, | ||
check_test_code: false, | ||
move_2: false, | ||
move_2: true, | ||
move_1: false, |
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.
Agree, but perhaps we should have either just keep this as move_2
with true the default, or remove one of the flags. Enum seems overkill.
@@ -564,8 +564,14 @@ impl CliCommand<&'static str> for TestPackage { | |||
self.move_options.bytecode_version, | |||
self.move_options.language_version, | |||
), | |||
compiler_version: self.move_options.compiler_version, | |||
language_version: self.move_options.language_version, | |||
compiler_version: self |
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.
Why are these changes needed? This should just be the same logic, based on different defaults in MoveOptions?
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.
I made this change mainly to make sure that so long as move_options is not set to V1 explicitly, it will always pass V2 to the compiler config.
6b4bee7
to
2e4f5d0
Compare
Co-authored-by: Vineeth Kashyap <[email protected]>
2e4f5d0
to
38a1522
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
Description
This PR
--move-1
flag to use Compiler v1 and Move 1.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.Manually test
aptos move run-script
with: (a) --move-2, (b) --move-1, (c) neither. (a) and (c) does not panic onMVC_BLOCK_V1=1
while (b) does.Manually test
aptos governance propose
with: (a) --move-2, (b) --move-1, (c) neither. (a) and (c) does not panic onMVC_BLOCK_V1=1
while (b) does.Manually test
aptos governance verify-proposal
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.
Also we need to make sure that this change should be independent of changing V2 as the default compiler for aptos-core
Type of Change
Which Components or Systems Does This Change Impact?
Checklist