rust-lang / cargo

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

Tracking Issue for `--lockfile-path` #14421

Open weihanglo opened 3 months ago

weihanglo commented 3 months ago

Summary

Original issue: #5707 Implementation: #14326 Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#lockfile-path

Added a new flag --lockfile-path that allows users to specify a path to lockfile other than the default path <workspace_root>/Cargo.lock.

Unresolved Issues

Future Extensions

No response

Tasks

About tracking issues

Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Ifropc commented 3 months ago

@rustbot claim

Ifropc commented 1 month ago

As far as shell completions go, I don't think we need to do anything in the scope of this task. In fact, it's alreadyready working on the latest nightly (as part of https://github.com/rust-lang/cargo/issues/14520) Image

epage commented 1 month ago

@Ifropc thats the new, unstable completion system.

The task is referring to our handwritten, stable completions

epage commented 1 month ago

That said, you could add a custom completer to the new completion system that restricts completions to files named Cargo.lock using PathCompleter::file().filter(...), see https://docs.rs/clap_complete/latest/clap_complete/engine/struct.PathCompleter.html

Ifropc commented 1 month ago

Got it, I will add the support into the stable system + will do the lock filter in the new system. Thought the unstable stuff is automatically grouped into the unstable autocomplete system as well, but guess it's a separate matter. Thanks Ed!