Skip to content

Commit

Permalink
Perform fixes from PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
rockbmb committed Sep 16, 2023
1 parent 338e18c commit 8b388e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions crates/sui/src/client_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -734,11 +734,15 @@ impl SuiClientCommands {
} => {
if build_config.test_mode {
return Err(SuiError::ModulePublishFailure {
error: "The `publish` subcommand should not be used with the `--test` flag\n\
\n\
Library code in published packages must not depend on test code.\n\
In order to fix this and publish the package without `--test`, search for, and remove \
instances of e.g. test modules declared as `friend`s of modules from `sources/`.".to_string(),
error:
"The `publish` subcommand should not be used with the `--test` flag\n\
\n\
Code in published packages must not depend on test code.\n\
In order to fix this and publish the package without `--test`, \
remove any non-test dependencies on test-only code.\n\
You can ensure all test-only dependencies have been removed by \
compiling the package normally with `sui move build`."
.to_string(),
}
.into());
}
Expand Down
2 changes: 1 addition & 1 deletion crates/sui/tests/cli_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ async fn test_package_publish_test_flag() -> Result<(), anyhow::Error> {
let expect = expect![[r#"
Err(
ModulePublishFailure {
error: "The `publish` subcommand should not be used with the `--test` flag\n\nLibrary code in published packages must not depend on test code.\nIn order to fix this and publish the package without `--test`, search for, and remove instances of e.g. test modules declared as `friend`s of modules from `sources/`.",
error: "The `publish` subcommand should not be used with the `--test` flag\n\nCode in published packages must not depend on test code.\nIn order to fix this and publish the package without `--test`, remove any non-test dependencies on test-only code.\nYou can ensure all test-only dependencies have been removed by compiling the package normally with `sui move build`.",
},
)
"#]];
Expand Down

0 comments on commit 8b388e9

Please sign in to comment.