-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[move-lang] Remove ability to assign values to named addresses in source code #8880
Conversation
1a9b024
to
55769e9
Compare
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.
Mostly good to go! Just maybe an additional test showing the old address syntax is invalid. And the few other small comments around.
...uage/move-lang/tests/move_check/expansion/named_address_assigned_multiple_times_invalid.move
Show resolved
Hide resolved
557b558
to
10e9181
Compare
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.
We can make improvements as we go, I'd like to see those move-prover arguments as lazy-static or something, so they aren't hard coded.
Thanks for doing this!
If you don't mind, can you also update the changelog?
"-a=Std=0x1", | ||
"-a=DiemFramework=0x1", | ||
"-a=DiemRoot=0xA550C18", | ||
"-a=CurrencyInfo=0xA550C18", | ||
"-a=TreasuryCompliance=0xB1E55ED", | ||
"-a=VMReserved=0x0", | ||
]; | ||
const REGULAR_TEST_FLAGS: &[&str] = &[ | ||
"--dependency=../move-stdlib/modules", | ||
"--dependency=../diem-framework/modules", | ||
"-a=Std=0x1", | ||
"-a=DiemFramework=0x1", | ||
"-a=DiemRoot=0xA550C18", | ||
"-a=CurrencyInfo=0xA550C18", | ||
"-a=TreasuryCompliance=0xB1E55ED", | ||
"-a=VMReserved=0x0", |
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.
Is there someway to populate these with the stuff in diem-framework and mvoe-stdlib, just worried about changes overtime
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.
Once we have packages we can do this without introducing a Cargo dep on the diem side of things. However, if I try to use the stuff from the diem-framework that will then introduce a diem dependency. So at least for now, I think we should probably keep this like this. I'll add a TODO and tag myself in it to change this once packages are in.
fa4e2de
to
9dab98d
Compare
/land |
Cluster Test Result
Repro cmd:
🎉 Land-blocking cluster test passed! 👌 |
9dab98d
to
093bc9e
Compare
This PR removes the ability to declare named address values in Move source code. Instead, all named address values need to be passed to the compiler -- today via the command line, but in the future this will be handled by the package system.
Nothing too interesting is happening in this PR, just a lot of plumbing. Probably the most interesting is that we now include the named address values in the metadata file that we have temporarily in the CLI.
Testing
Updated tests to make them all pass with the new syntax.