-
Notifications
You must be signed in to change notification settings - Fork 11.4k
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
[CLI] Improve warning message for source verification failure #13267
Conversation
...when publishing or upgrading packages via the CLI. Improvements are as follows: - Preserve formatting in the error (newlines, etc) by removing debug formatting. - Add context explaining what the warning means, and that it can be ignored using a command-line flag. Test Plan: - Create two packages: `test` depending on `dep`. - Publish `dep`, and update its manifest with its published location. - Modify `dep`'s source to be different from the version that was published. - Try to publish `test`, expect a source verification error, which now looks like this: ``` Failed to publish the Move module(s), reason: [warning] Local dependency did not match its on-chain version at b33d80d795a038ce44d1f67b84047493f8775ab29d7f856271f705c6e1fd329f::Dep::dep This may indicate that the on-chain version(s) of your package's dependencies may behave differently than the source version(s) your package was built against. Fix this by rebuilding your packages with source versions matching on-chain versions of dependencies, or ignore this warning by re-running with the --skip-dependency-verification flag. ```
The latest updates on your projects. Learn more about Vercel for Git ↗︎
5 Ignored Deployments
|
Just thinking out loud - would it make sense to add a "force refetch" flag to the CLI? The cause of the issue usually is folks using "testnet" as a ref, and Move CLI does not refetch deps when a branch is specified (as in not commit hash). |
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.
Looks good to me but left a comment with an idea of how this or a follow up action could help make it better.
I need to understand this better: The default behaviour of the toolchain is to refetch remote (git) dependencies before you compile, and you need to use the |
## Description ...when publishing or upgrading packages via the CLI. Improvements are as follows: - Preserve formatting in the error (newlines, etc) by removing debug formatting. - Add context explaining what the warning means, and that it can be ignored using a command-line flag. ## Test Plan - Create two packages: `test` depending on `dep`. - Publish `dep`, and update its manifest with its published location. - Modify `dep`'s source to be different from the version that was published. - Try to publish `test`, expect a source verification error, which now looks like this: ``` Failed to publish the Move module(s), reason: [warning] Local dependency did not match its on-chain version at b33d80d795a038ce44d1f67b84047493f8775ab29d7f856271f705c6e1fd329f::Dep::dep This may indicate that the on-chain version(s) of your package's dependencies may behave differently than the source version(s) your package was built against. Fix this by rebuilding your packages with source versions matching on-chain versions of dependencies, or ignore this warning by re-running with the --skip-dependency-verification flag. ``` --- 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) - [ ] protocol change - [x] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes The source verification failure warning from package publish and upgrade CLI commands has improved formatting and suggests ways to fix the issue or silence the warning.
Description
...when publishing or upgrading packages via the CLI. Improvements are as follows:
Test Plan
test
depending ondep
.dep
, and update its manifest with its published location.dep
's source to be different from the version that was published.test
, expect a source verification error, which now looks like this: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
The source verification failure warning from package publish and upgrade CLI commands has improved formatting and suggests ways to fix the issue or silence the warning.