-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Error when publishing packages via sui client publish --test
#13679
Comments
Hello @randall-Mysten, Pleas excuse the ping over this; could you clarify whether the If it should, then this issue is a problem for Move developers, as it prevents the publishing of packages that e.g. must test a |
Hi @rockbmb,
The error that you are then getting when trying to publish the code compiled in test mode is actually by design -- we add specific markers to test-only code so that it cannot be published on a network, and this is what you're then seeing with the |
Thank you @tzakian! |
Thank you @tzakian and @randall-Mysten. Rather than raising an error, do you agree it would be better to remove the |
Hi @rockbmb, We do indeed use Feel free to either ping here if you have questions, or add me as a reviewer, and I can take a look and add anyone else that should have a look as well. |
0x54A334f2D92eB20943e81FECE430eaDEF49971a3 |
## Description This PR disables the use of the `--test` flag when executing `sui client publish`. It closes #13679, following discussion in that thread. ## Test Plan I've added a test to `./crates/sui/tests/cli_tests.rs` that verifies the `--test` flag will no longer be accepted with `client publish`, along with an error message explaining why. --- ### 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 * Added an error message to Sui CLI when trying to publish a package via `sui client publish`, and the package requires compilation in test mode
sui client publish--test
sui client publish-- test
sui client publish-- test
sui client publish --test
There seems to be a problem with publishing packages with
sui client
using the--test
flag. Below is an MRE.I have searched this repository's issue list for similar issues mentioning
friend/public(friend)
or--test
, but was unable to find anything related.Steps to Reproduce Issue
sui move new friend_test
sources
and another in a new directory calledtests
, such that$ tree . ├── Move.lock ├── Move.toml ├── sources │ └── main.move └── tests └── test.move
main.move
test.move
Note the required
--test
flag becausefriend_test::test
uses apublic(friend)
function fromfriend_test::main
.Expected Result
The package should be published, with output similar to the below (as of
sui
version1.9.0
)Actual Result
The following error is shown as a result:
Error executing transaction: Failure { error: "VMVerificationOrDeserializationError in command 0", }
System Information
Ubuntu 20.04.6 LTS
(WSL)The text was updated successfully, but these errors were encountered: