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)`
Yea, the problem is that it now tries to generate Cargo.lock from the package-ready Cargo.toml where the path 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.
If you're poking around, there's also this check that'd be great to remove from --list:
error: all path dependencies must have a version specified when packaging.
dependency `subcrate` does not specify a version.
@sfackler I think that warning/error is addressed by https://github.com/rust-lang/rfcs/pull/2906
Any chance of folding the fix for this into 1.34.1? cc @Mark-Simulacrum
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.
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.
I will try to do the legwork (most likely self approving if no one objects) later today.