-
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
Upgrade Errors for struct enum functions #20151
base: main
Are you sure you want to change the base?
Upgrade Errors for struct enum functions #20151
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
0cdd0c3
to
6149e81
Compare
6149e81
to
0bf7e4a
Compare
@@ -15,6 +15,7 @@ pub mod key_identity; | |||
pub mod keytool; | |||
pub mod shell; | |||
pub mod sui_commands; | |||
mod upgrade_compatibility; |
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.
What does this change do?
= Enums are part of a module's public interface and cannot be changed during an upgrade | ||
= Restore the original enum's variants for enum 'EnumChangeVariant' including the ordering. | ||
|
||
error[Compatibility E01002]: type mismatch |
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 this really a "type mismatch"?
59 │ B { b: u8 }, // added | ||
│ ^^^^^^^^^^^ New unexpected variant 'B'. | ||
│ | ||
= Enums are part of a module's public interface and cannot be changed during an upgrade. |
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'm seeing some weird characters at the end of these lines on GitHub. Any idea what is up here?
Vec::<(Loc, String)>::new(), | ||
vec![ | ||
"Functions are part of a module's public interface and cannot be changed during an upgrade.".to_string(), | ||
format!("Restore the original function's parameters for function '{function_name}', expected {} parameters.", old_function.parameters.len()) |
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 might want to do some manual line breaks in the string here for some manual formatting, e.g.
format!("Restore the original function's parameters for function '{function_name}', expected {} parameters.", old_function.parameters.len()) | |
format!("Restore the original function's parameters for \ | |
function '{function_name}', expected {} parameters.", old_function.parameters.len()) |
Description
Add struct, enum and function errors to upgrade errors, leaves out type params to give it, it's own PR.
Test plan
snapshots
Release notes
no effect until enabled
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.