[beta] Backport cargo publish fixes#10707
Merged
bors merged 1 commit intorust-lang:rust-1.62.0from May 27, 2022
Merged
Conversation
fix(publish): add more check when use `publish -p <SPEC>` ### Main issue As issue say rust-lang#10536 , we need add more check when user use `cargo publish -p <SPEC>` >`@ehuss` point outs: >From a behavior standpoint, here are some things to check: > - In the root of a virtual workspace, it should be an error to run without -p. >- It should be an error to pass -p for a non-workspace member. >- It should be an error for -p to match multiple packages. >- When using -p, it should publish that package, not the one in the current directory (which can be different).
|
@ehuss: no appropriate reviewer found, use r? to override |
|
Member
|
Make sense @bors r+ |
Contributor
|
📌 Commit 735f2c8 has been approved by |
Contributor
Contributor
|
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 2, 2022
[beta] Beta backports * Allow the unused_macro_rules lint for now rust-lang#97032 * Fix some typos in arg checking algorithm rust-lang#97303 * rustc: Fix ICE in native library error reporting rust-lang#97328 * Cargo: * Fix `cargo publish -p spec` rust-lang/cargo#10707
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Beta backport of #10677.
I think it is a serious regression where
cargo publishmay publish the wrong package in some circumstances. I think it warrants a beta backport to get the fix out asap.