rust-lang / cargo

The Rust package manager
https://doc.rust-lang.org/cargo
Apache License 2.0
12.71k stars 2.42k forks source link

Deprecate `cargo verify-project` #14679

Open weihanglo opened 2 weeks ago

weihanglo commented 2 weeks ago

Problem

I never found cargo verify-project useful. It never checks semantics of Cargo.toml. What it does is merely

I don't know if in the wild it is heavily used, but apparently on GitHub it's not (see this search result). It also causes confusions like people expecting it to verify more stuff (#11202).

I wonder if it's time to decide how this command should be.

Proposed Solution

We have at least two choices.

Notes

Commit: e8adba9d24257e14fef8793cecabb55b2fbcd0e3

weihanglo commented 2 weeks ago

This is the oldest commit I found https://github.com/rust-lang/cargo/commit/4de86d2eec82a92944245d0f269fe55907135de7 relevant. Looks like cargo-verify-project ought to be more useful than it is now.

https://github.com/rust-lang/cargo/blob/4de86d2eec82a92944245d0f269fe55907135de7/README.md?plain=1#L32-L39

epage commented 1 week ago

... I wonder if this predates the rename of project to package which would explain why it uses project in the name.

In general, I want to re-examing our plumbing and see if there is a better route to go, inspired by the Argon/smelt ideas.

ehuss commented 4 days ago

The cargo team discussed this, and decided that the verify-project command should probably be deprecated. The command is almost never used, and doesn't really do very much (and probably not what people expect).

In the future, we may consider undeprecating it, replacing it with a different command, or setting it up under a unified plumbing system.

We didn't discuss the exact details of how it should be deprecated (possibly similar to read-manifest?), but I would expect at least marking it in the documentation. We could also start removing it from the documentation or the command listings?