-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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-compiler] Add public struct type support to the parser #13917
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
d19e521
to
f955406
Compare
9beb78a
to
4c88acd
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.
To my knowledge this is the first backwards incompatible change, so we need to split off a separate version of the move-stdlib that tracks the new 2024 edition as well.
It is indeed neat to do so, but we don't have to split it off, and it might be worth not doing so to make sure we aren't breaking the compiler. Thoughts?
We would just need to change the tests to stick the stdlib stuff in its own package with its own package config settings
false | ||
} else { | ||
true |
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.
🧠
let current_package = context.package_name; | ||
match visibility { |
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.
Nit, maybe check the feature gate at the top level here, as I think this is a bit strange as is
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.
My thinking behind this was to only mention the feature gate if there's a public struct
but not if, e.g., someone wrote public(package) struct
or something like that. But, happy to move it up to the top level as well :)
@@ -0,0 +1,10 @@ | |||
[package] |
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.
Ah, neat! This should be fun :)
4c88acd
to
29dbd51
Compare
I like this idea! Let me see about updating it so we compile the stdlib in legacy mode. |
29dbd51
to
b435686
Compare
75a55b0
to
240ce6c
Compare
240ce6c
to
04a496a
Compare
04a496a
to
930032c
Compare
930032c
to
989e664
Compare
989e664
to
292b03b
Compare
Description
Add support for
public struct
declarations in the Move 2024 edition.To my knowledge this is the first backwards incompatible change, so we need to split off a separate version of the move-stdlib that tracks the new 2024 edition as well.
The bottom commit of this PR does this, and also refactors the test runner so we aren't passing so many fields all the time in the test runner.
Test Plan
Added additional tests.
If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.
Type of Change (Check all that apply)
Release notes
Adds initial
public struct
type visibility support to Move 2024.alpha. When using the Move 2024.alpha edition you will be required to writepublic
in front of the struct type which will keep the same semantics asstruct
with no visibility modifiers today (i.e., in thelegacy
edition), this is to allow for future support of private struct types.