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

Cargo.lock not removed if git dependencies has been removed #197

Open
pbsds opened this issue Sep 26, 2023 · 5 comments
Open

Cargo.lock not removed if git dependencies has been removed #197

pbsds opened this issue Sep 26, 2023 · 5 comments

Comments

@pbsds
Copy link
Contributor

pbsds commented Sep 26, 2023

While making this pr i noticed nix-update update the vendored lock file, instead of removing it.

@Mic92
Copy link
Owner

Mic92 commented Sep 27, 2023

Not sure we should "fix" this. We are not able to tell if it was changed to cargoHash and than deleting some random Cargo.lock might actually upset the user.

@Mic92
Copy link
Owner

Mic92 commented Sep 27, 2023

We would need to evaluate before and see if there had been cargoLock attributes and only drop it in that case.

@pbsds
Copy link
Contributor Author

pbsds commented Sep 27, 2023

Is there a reason to prefer cargoLock over cargoHash? Cache reuse?

@Artturin
Copy link
Contributor

Is there a reason to prefer cargoLock over cargoHash? Cache reuse?

Only if the lock has git dependencies in which case outputHashes is required

@pbsds
Copy link
Contributor Author

pbsds commented Oct 17, 2023

There is also the fact that with cargoLock each dep becomes a derivation, making for better cache reuse. But on the whole I'd say its speed and cache benefits are not worth vendoring lock files, and it's not like we make use of the multiple derivations in any other way.

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

No branches or pull requests

3 participants