Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking Issue for --lockfile-path #14421

Open
2 of 5 tasks
weihanglo opened this issue Aug 18, 2024 · 5 comments
Open
2 of 5 tasks

Tracking Issue for --lockfile-path #14421

weihanglo opened this issue Aug 18, 2024 · 5 comments
Assignees
Labels
A-lockfile Area: Cargo.lock issues C-tracking-issue Category: A tracking issue for something unstable. S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review S-waiting-on-feedback Status: An implemented feature is waiting on community feedback for bugs or design concerns.

Comments

@weihanglo
Copy link
Member

weihanglo commented Aug 18, 2024

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

  • How this should work if the lockfile or a parent directory is not present
    • In #14326, missing parent directories will be created when Cargo is about to write the lockfile. This minimizes the chance of creating dangling directories.
  • cargo install --lockfile-path implies --locked, and requires the alternaive lockfile to exist.
    • This behavior diverges from other commands, which allow the absence of lockfile at the alternative path.

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.

@weihanglo weihanglo added the C-tracking-issue Category: A tracking issue for something unstable. label Aug 18, 2024
@weihanglo weihanglo added A-lockfile Area: Cargo.lock issues S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review S-waiting-on-feedback Status: An implemented feature is waiting on community feedback for bugs or design concerns. labels Aug 18, 2024
@Ifropc
Copy link
Contributor

Ifropc commented Aug 18, 2024

@rustbot claim

bors added a commit that referenced this issue Aug 18, 2024
doc: update lockfile-path tracking issue

Update tracking issue of lockfile path feature to #14421
(in documentation and code)
r? `@weihanglo`
bors added a commit that referenced this issue Aug 19, 2024
doc: add lockfile-path unstable doc section

Adds lockfile-path into the unstable doc section as part of tracking issue #14421 tasks
@Ifropc
Copy link
Contributor

Ifropc commented Sep 27, 2024

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 #14520)
Image

@epage
Copy link
Contributor

epage commented Sep 27, 2024

@Ifropc thats the new, unstable completion system.

The task is referring to our handwritten, stable completions

@epage
Copy link
Contributor

epage commented Sep 27, 2024

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

bors added a commit that referenced this issue Sep 27, 2024
feat: lockfile path implies --locked on cargo install

Follow-up of #14421
Resolving one of the items
> cargo install should make --lockfile-path imply --locked

Simply mirrored behavior as if `--locked` was provided (on creating the workspace)
@Ifropc
Copy link
Contributor

Ifropc commented Sep 27, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lockfile Area: Cargo.lock issues C-tracking-issue Category: A tracking issue for something unstable. S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review S-waiting-on-feedback Status: An implemented feature is waiting on community feedback for bugs or design concerns.
Projects
Status: In Progress
Development

No branches or pull requests

3 participants