Use workspace lockfile when running cargo package and cargo publish#11477
Use workspace lockfile when running cargo package and cargo publish#11477bors merged 4 commits intorust-lang:masterfrom
cargo package and cargo publish#11477Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon. Please see the contribution instructions for more information. |
tests/testsuite/publish_lockfile.rs
Outdated
| .file("bar/src/main.rs", "fn main() {}") | ||
| .build(); | ||
| p.cargo("generate-lockfile").run(); | ||
| p.cargo("update -p serde:0.2.1 --precise 0.2.0").run(); |
There was a problem hiding this comment.
Is it possible to move Package::new("serde", "0.2.1").publish(); to this line (and to replace it)?
There was a problem hiding this comment.
Sure! Yeah, that makes it clearer what the test is doing.
weihanglo
left a comment
There was a problem hiding this comment.
Looks good to me. Thank you!
Could we do it in two commits? That is,the first commit contains the test passed with the "wrong" behaviour. The second commit contains the actual fix and the correct with_stderr output.
weihanglo
left a comment
There was a problem hiding this comment.
Oh you already did that, sorry I missed it 🤪
|
Thanks again! @bors r+ |
|
☀️ Test successful - checks-actions |
7 commits in c994a4a638370bc7e0ffcbb0e2865afdfa7d4415..2381cbdb4e9b07090f552d34a44a529b6e620e44 2022-12-18 21:50:58 +0000 to 2022-12-23 12:19:27 +0000 - fix: deduplicate dependencies by artifact target (rust-lang/cargo#11478) - Add warning if potentially-scrapable examples are skipped due to dev-dependencies (rust-lang/cargo#11503) - Don't scrape examples from library targets by default (rust-lang/cargo#11499) - Stabilize terminal-width (rust-lang/cargo#11494) - Make sure that hash of `SourceId` is stable (rust-lang/cargo#11501) - Use workspace lockfile when running `cargo package` and `cargo publish` (rust-lang/cargo#11477) - Show `--help` if there is no man page for subcommand (rust-lang/cargo#11473)
Update cargo 7 commits in c994a4a638370bc7e0ffcbb0e2865afdfa7d4415..2381cbdb4e9b07090f552d34a44a529b6e620e44 2022-12-18 21:50:58 +0000 to 2022-12-23 12:19:27 +0000 - fix: deduplicate dependencies by artifact target (rust-lang/cargo#11478) - Add warning if potentially-scrapable examples are skipped due to dev-dependencies (rust-lang/cargo#11503) - Don't scrape examples from library targets by default (rust-lang/cargo#11499) - Stabilize terminal-width (rust-lang/cargo#11494) - Make sure that hash of `SourceId` is stable (rust-lang/cargo#11501) - Use workspace lockfile when running `cargo package` and `cargo publish` (rust-lang/cargo#11477) - Show `--help` if there is no man page for subcommand (rust-lang/cargo#11473) r? `@ghost`
What does this PR try to resolve?
Fix #11148.
How should we test and review this PR?
Please run the integration test in
tests/testsuite/publish_lockfile.rsor try the steps from the issue.