-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Dirty Cargo.lock file reported on package/publish even if in .gitignore #15339
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
Comments
Thanks for the report and the reproducible steps!
The lock file is not dirty in the sense of calling the plain And the lockfile indeed get packaged into your final |
There are some nuances.
The latter might be risky. People may have already excluded or gitignore'd the lockfile. Changing that means it will start breaking more workflow. Although we've talked about expanding it to checking the entire workspace, I'd rather not do that at this moment. Also, we seemed to settle on checking mainfest but didn't really discuss much about lockfile. |
### What does this PR try to resolve? Fixes #15339 Lockfile might be gitignore'd, So it never shows up in `git status`. However, `cargo packag` vcs checks actually performs `git status --untracked --ignored`. It is a bit confusing that lockfile is ignored but still counts as dirty from the report of `cargo package`. There are some more nuances: We check lockfile's VCS status if the lockfile is ouside the current package root. That means a non-workspace Cargo package will not have this VCS check. I don't think it is good that we have diverged behaviors Hence this revert. We can always re-evaluate later, as we've reserved rooms for doing more dirty checks. #14967 (comment) ### How should we test and review this PR? See if the revert is what we want now. Or we should do a more thorough check for both workspace and non-workspace cases. ### Additional information This is a revert of f0907fc from #15276
Uh oh!
There was an error while loading. Please reload this page.
Problem
Cargo throws an error when trying to publish/package alloy-rs/core on nightly (
cargo 1.87.0-nightly (6cf826701 2025-03-14)
), while it works fine on stable (1.85).This breaks our cargo-release workflow, and I don't really understand this error since Cargo.lock is not dirty, is in .gitignore, and also adding it to Cargo.toml package.exclude doesn't help.
Bisected to nightly-2025-03-11 -> rust-lang/rust#138200 -> probably #15276.
Steps
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: