You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR is to improve the substrate-differ to detect more compatibility changes and improve the reported changes.
Expands the compatibility checking to all parts of a pallet: Calls, Storage, Events, Errors, Constants.
Improve type change detection by hashing the type (only the general shape of the type). This allows detecting changes to deeply nested types (i.e. a type that isn't an top-level extrinsic parameter, storage key/value, etc..).
Add a "Require storage migration" check.
Allow enums to add new variants.
If the hash of a type changes, do a direct compatibility check of the old and new types to allow for some changes like new enum variants or wrapping/unwrapping of a type (i.e. OldWeight(pub u64) -> u64)
Here is an example output from one of our PRs. Note the NOT COMPATIBLE that are used to help trace where a breaking change happened. There is also a REQUIRES TX VERSION BUMP marker to help find where a TX breaking change happened, but this report doesn't have a tx API change.
Very nice, thanks for the PR @Neopallium and happy to see you found this crate helpful.
Would you mind updating the crates' readme in libs/substrae-differ/README.md to reflect your changes ?
Feel free to drop a note in the main readme if you wish, but there you have to do it in README_src.adoc and not in the README.md (which is generated).
I would also love to have a few tests showing at least 2 scenarri where "requires storage migration" return true and false.
You can use any 2/3 of your runtimes for that. It makes it easier if you add the commands to fetch them in fetch-wasm.sh for instance.
Those tests will NOT run in CI if you flag them as local-data, yet they can be ran manually:
Those local data are no ran via CI because I don't want to start trying to fetch ancient runtimes but it is good to have them to ensure from time to time that everything still runs fine.
I will miss an update of the doc for subwasm itself but I can take care of generating a new one once the PR is merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is to improve the
substrate-differto detect more compatibility changes and improve the reported changes.OldWeight(pub u64)->u64)At Polymesh we added a metadata checker to our CI pipeline to help us spot Breaking API changes:
https://github.com/PolymeshAssociation/Polymesh/tree/develop/metadata-tools
It is using the
substrate-differfrom this PR.Here is an example output from one of our PRs. Note the
NOT COMPATIBLEthat are used to help trace where a breaking change happened. There is also aREQUIRES TX VERSION BUMPmarker to help find where a TX breaking change happened, but this report doesn't have a tx API change.