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

feat: Add new cmdline option --no-track #1111

Merged
merged 1 commit into from
Jun 3, 2023
Merged

feat: Add new cmdline option --no-track #1111

merged 1 commit into from
Jun 3, 2023

Conversation

NobodyXu
Copy link
Member

@NobodyXu NobodyXu commented May 31, 2023

Same as cargo-install's --no-track.
It is also passed to cargo-install if it is invoked.

Also fixed fs::atomic_symlink_file which on Windows could fallback to
non-atomic install if symlinking failed.

@passcod
Copy link
Member

passcod commented May 31, 2023

We should use --no-track instead, as that's cargo-install's version, and pass it down too.

@passcod
Copy link
Member

passcod commented May 31, 2023

Does our implementation also skip the file locking? If so, we should mention it in the help, same as cargo-install does

By default, Cargo keeps track of the installed packages with a metadata file stored in the installation root directory. This flag tells Cargo not to use or create that file. With this flag, Cargo will refuse to overwrite any existing files unless the --force flag is used. This also disables Cargo’s ability to protect against multiple concurrent invocations of Cargo installing at the same time.

@NobodyXu
Copy link
Member Author

NobodyXu commented Jun 1, 2023

We should use --no-track instead, as that's cargo-install's version, and pass it down too.

Thanks, I didn't know that cargo-install supports --no-track!

Does our implementation also skip the file locking?

Yes.

If so, we should mention it in the help, same as cargo-install does

By default, Cargo keeps track of the installed packages with a metadata file stored in the installation root directory. This flag tells Cargo not to use or create that file. With this flag, Cargo will refuse to overwrite any existing files unless the --force flag is used. This also disables Cargo’s ability to protect against multiple concurrent invocations of Cargo installing at the same time.

--no-manifests currently only skips file locking, but does not implement:

With this flag, Cargo will refuse to overwrite any existing files unless the --force flag is used.

I would implement this later.

@NobodyXu NobodyXu marked this pull request as draft June 2, 2023 14:49
@NobodyXu NobodyXu force-pushed the feat/no-manifest branch 3 times, most recently from 0f3b5b3 to 0e0e200 Compare June 2, 2023 15:09
@NobodyXu
Copy link
Member Author

NobodyXu commented Jun 2, 2023

I've implemented it as requested, but I haven't got time to write the tests yet.
I would add one tests tomorrow.

@NobodyXu NobodyXu changed the title feat: Add new cmdline option --no-manifests feat: Add new cmdline option --no-track Jun 3, 2023
Same as `cargo-install`'s `--no-track`.
It is also passed to `cargo-install` if it is invoked.

Also fixed `fs::atomic_symlink_file` which on Windows could fallback to
non-atomic install if symlinking failed.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@NobodyXu NobodyXu marked this pull request as ready for review June 3, 2023 06:30
@NobodyXu
Copy link
Member Author

NobodyXu commented Jun 3, 2023

I've added e2e test for --no-track.
@passcod Please review this when it's convenient for you.

@NobodyXu NobodyXu added this pull request to the merge queue Jun 3, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 3, 2023
@NobodyXu NobodyXu added this pull request to the merge queue Jun 3, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 3, 2023
@NobodyXu NobodyXu added this pull request to the merge queue Jun 3, 2023
Merged via the queue into main with commit 1432093 Jun 3, 2023
@NobodyXu NobodyXu deleted the feat/no-manifest branch June 3, 2023 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants