Closed
Description
I have some internal distribution packaging logic that uses cargo package --list
to find the set of files it should bundle up along with the binary (respecting gitignore, include/exclude, etc).
However, in 1.43 it appears that the command now requires any dependencies of the crate be published for it to work.
Test repository: https://github.com/sfackler/package-regression
On 1.42.0:
$ cargo package --list
warning: manifest has no description, license, license-file, documentation, homepage or repository.
See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
.cargo_vcs_info.json
.gitignore
Cargo.lock
Cargo.toml
src/main.rs
On 1.43.0:
warning: manifest has no description, license, license-file, documentation, homepage or repository.
See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
Updating crates.io index
error: no matching package named `subcrate` found
location searched: registry `https://github.com/rust-lang/crates.io-index`
required by package `package-regression v0.1.0 (/Users/sfackler/package-regression)`
Activity
ehuss commentedon Apr 24, 2020
Yea, the problem is that it now tries to generate
Cargo.lock
from the package-readyCargo.toml
where thepath
entries have been removed (here). This was changed in #7905. I'll take a look at deferring that or making it lazy so that it doesn't affect--list
.sfackler commentedon Apr 24, 2020
If you're poking around, there's also this check that'd be great to remove from
--list
:alexcrichton commentedon Apr 24, 2020
@sfackler I think that warning/error is addressed by rust-lang/rfcs#2906
cargo package --list
even for things that don't package. #8175Auto merge of #8175 - ehuss:allow-package-list, r=alexcrichton
sfackler commentedon May 1, 2020
Any chance of folding the fix for this into 1.34.1? cc @Mark-Simulacrum
Mark-Simulacrum commentedon May 2, 2020
I'm happy to do so on release team side, @ehuss or @rust-lang/cargo, can someone sign off on that? I can work on a backport and such tomorrow.
ehuss commentedon May 3, 2020
Seems fine to me. @Mark-Simulacrum or @sfackler are you ok with submitting all the PRs? At a minimum, #8138 will also need to be included to get CI to pass. I think stable will also need #8080, and maybe #8098. There might be others.
Mark-Simulacrum commentedon May 3, 2020
I will try to do the legwork (most likely self approving if no one objects) later today.
Backport Cargo patch to fix rust-lang/cargo#8151 on stable
Auto merge of rust-lang#8175 - ehuss:allow-package-list, r=alexcrichton
Update lang/rust to version 1.43.1.