Skip to content

Commit

Permalink
Abilities can be added during upgrade (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
vineethk authored Nov 4, 2024
1 parent ddafc6d commit d8216c7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ When using `compatible` upgrade policy, a module package can be upgraded. Howeve
published previously need to be compatible and follow the rules below:

- All existing structs' fields cannot be updated. This means no new fields can be added and existing fields cannot be
modified. Struct abilities also cannot be changed (no new ones added or existing removed).
modified.
- All public and entry functions cannot change their signature (argument types, type argument, return types). However,
argument names can change.
- `public(friend)` functions are treated as private and thus their signature can arbitrarily change. This is safe as
only modules in the same package can call friend functions anyway, and they need to be updated if the signature changes.
- [Enum type upgrade compatibility rules](enums.mdx#enum-type-upgrade-compatibility).
- Existing abilities on a struct/enum type cannot be removed (but abilities can be added).

When updating your modules, if you see an incompatible error, make sure to check the above rules and fix any violations.

Expand Down

0 comments on commit d8216c7

Please sign in to comment.