Skip to content
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

Improve the error message if publish is false or empty list #11280

Merged
merged 3 commits into from
Oct 24, 2022

Conversation

Rustin170506
Copy link
Member

What does this PR try to resolve?

close #11262

Improve the error message if publish is the false or empty list.

Say publish is set to false or an empty list in Cargo.toml and prevents publishing.

How should we test and review this PR?

Unit test

Additional information

If there was a way we could tell publish to be empty or false, I think it would get better. If you know an easy way to implement it, please feel free to comment.

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
@rust-highfive
Copy link

r? @epage

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 23, 2022
@Rustin170506 Rustin170506 marked this pull request as ready for review October 23, 2022 07:58
@Rustin170506
Copy link
Member Author

If there was a way we could tell publish to be empty or false, I think it would get better. If you know an easy way to implement it, please feel free to comment.

I think we can use VecStringOrBool for public, but I am not sure does it make sense to use it in the Manifest struct.

Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use VecStringOrBool for public, but I am not sure does it make sense to use it in the Manifest struct.

We can discuss it afterward. The pull request looks good to me to be merged.

src/cargo/ops/registry.rs Outdated Show resolved Hide resolved
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
@weihanglo
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 24, 2022

📌 Commit 6c9f36d has been approved by weihanglo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 24, 2022
@bors
Copy link
Collaborator

bors commented Oct 24, 2022

⌛ Testing commit 6c9f36d with merge 19d37d2...

@bors
Copy link
Collaborator

bors commented Oct 24, 2022

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 19d37d2 to master...

@bors bors merged commit 19d37d2 into rust-lang:master Oct 24, 2022
@Rustin170506 Rustin170506 deleted the rustin-patch-error-msg branch October 24, 2022 16:17
compiler-errors pushed a commit to compiler-errors/rust that referenced this pull request Oct 26, 2022
5 commits in 071eeaf210708219a5a1b2c4728ca2f97df7f2ae..9210810d1fd7b51ae0439a0a363cc50e36963455
2022-10-22 01:17:55 +0000 to 2022-10-25 22:31:50 +0000

- Fix 410 gone response handling (rust-lang/cargo#11286)
- Fix inequality in "stale mtime" log messages (rust-lang/cargo#11281)
- doc(cargo-tree): mention it considering feature unification (rust-lang/cargo#11282)
- Improve the error message if `publish` is `false` or empty list (rust-lang/cargo#11280)
- Add test for deleted index entry (rust-lang/cargo#11278)
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Oct 26, 2022
Update cargo

5 commits in 071eeaf210708219a5a1b2c4728ca2f97df7f2ae..9210810d1fd7b51ae0439a0a363cc50e36963455 2022-10-22 01:17:55 +0000 to 2022-10-25 22:31:50 +0000

- Fix 410 gone response handling (rust-lang/cargo#11286)
- Fix inequality in "stale mtime" log messages (rust-lang/cargo#11281)
- doc(cargo-tree): mention it considering feature unification (rust-lang/cargo#11282)
- Improve the error message if `publish` is `false` or empty list (rust-lang/cargo#11280)
- Add test for deleted index entry (rust-lang/cargo#11278)
JohnTitor pushed a commit to JohnTitor/rust that referenced this pull request Oct 26, 2022
Update cargo

5 commits in 071eeaf210708219a5a1b2c4728ca2f97df7f2ae..9210810d1fd7b51ae0439a0a363cc50e36963455 2022-10-22 01:17:55 +0000 to 2022-10-25 22:31:50 +0000

- Fix 410 gone response handling (rust-lang/cargo#11286)
- Fix inequality in "stale mtime" log messages (rust-lang/cargo#11281)
- doc(cargo-tree): mention it considering feature unification (rust-lang/cargo#11282)
- Improve the error message if `publish` is `false` or empty list (rust-lang/cargo#11280)
- Add test for deleted index entry (rust-lang/cargo#11278)
@ehuss ehuss added this to the 1.66.0 milestone Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo publish error message unhelpful with publish = false
6 participants