Skip to content

Commit

Permalink
update dep only test
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanjennings-mysten committed Jan 24, 2025
1 parent 2b75e17 commit 44eff4c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@
source: crates/sui/src/upgrade_compatibility/../unit_tests/upgrade_compatibility_tests.rs
expression: normalize_path(err.to_string())
---
error[Compatibility E02001]: variant mismatch
error[Compatibility E01010]: new declaration
┌─ /fixtures/upgrade_errors/deponly_errors_v2/sources/UpgradeErrors.move:4:18
4module upgrades::upgrades {
^^^^^^^^ New unexpected enum 'NewEnum'.
= Enums are part of a module's public interface and cannot be changed during an upgrade.
= Restore the original enum 'NewEnum' including the ordering.
= Enums cannot be added during a 'dependency only' upgrade.
= Remove the enum 'NewEnum' from its module.

error[Compatibility E03001]: function signature mismatch
error[Compatibility E01010]: new declaration
┌─ /fixtures/upgrade_errors/deponly_errors_v2/sources/UpgradeErrors.move:4:18
4module upgrades::upgrades {
^^^^^^^^ New unexpected function 'new_function'.
= Functions are part of a module's public interface and cannot be changed during an upgrade.
= Restore the original function 'new_function' including the ordering.
= Functions cannot be added during a 'dependency only' upgrade.
= Remove the function 'new_function' from itsfc module.

error[Compatibility E01002]: type mismatch
error[Compatibility E01010]: new declaration
┌─ /fixtures/upgrade_errors/deponly_errors_v2/sources/UpgradeErrors.move:7:19
7 │ public struct NewStruct {
^^^^^^^^^ New unexpected struct 'NewStruct'.
= Structs are part of a module's public interface and cannot be removed or changed during an upgrade.
= Restore the original struct 'NewStruct' including the ordering.
= Structs cannot be added during a 'dependency only' upgrade.
= Remove the struct 'NewStruct' from its module.


Upgrade failed, this package requires changes to be compatible with the existing package. Its upgrade policy is set to 'dependency only'.
6 changes: 3 additions & 3 deletions crates/sui/src/upgrade_compatibility/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2085,7 +2085,7 @@ fn struct_new_diag(
Vec::<(Loc, String)>::new(),
vec![
"Structs cannot be added during a 'dependency only' upgrade.".to_string(),
format!("Remove the struct '{struct_name}' from it's module.",),
format!("Remove the struct '{struct_name}' from its module.",),
],
));

Expand Down Expand Up @@ -2156,7 +2156,7 @@ fn enum_new_diag(
Vec::<(Loc, String)>::new(),
vec![
"Enums cannot be added during a 'dependency only' upgrade.".to_string(),
format!("Remove the enum '{enum_name}' from it's module.",),
format!("Remove the enum '{enum_name}' from its module.",),
],
));

Expand Down Expand Up @@ -2230,7 +2230,7 @@ fn function_new_diag(
Vec::<(Loc, String)>::new(),
vec![
"Functions cannot be added during a 'dependency only' upgrade.".to_string(),
format!("Remove the function '{function_name}' from it's module."),
format!("Remove the function '{function_name}' from itsfc module."),
],
));

Expand Down

0 comments on commit 44eff4c

Please sign in to comment.