-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: revert the behavior checking lockfile's VCS status #15341
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
epage
reviewed
Mar 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that f0907fc has a comment change that was not reverted in this commit
epage
approved these changes
Mar 24, 2025
Feel free to merge when CI is green |
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. rust-lang#14967 (comment)
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 27, 2025
Update cargo 10 commits in 307cbfda3119f06600e43cd38283f4a746fe1f8b..a6c604d1b8a2f2a8ff1f3ba6092f9fda42f4b7e9 2025-03-20 20:00:39 +0000 to 2025-03-26 18:11:00 +0000 - fix(package): update tracking issue for `--message-format` (rust-lang/cargo#15354) - docs(contrib): Expand the description of team meetings (rust-lang/cargo#15349) - feat(package): add unstable `--message-format` flag (rust-lang/cargo#15311) - feat(complete): Added completion for `--profile` (rust-lang/cargo#15308) - Uplift windows Cygwin DLL import libraries (rust-lang/cargo#15193) - do not pass cdylib link args to test (rust-lang/cargo#15317) - fix: revert the behavior checking lockfile's VCS status (rust-lang/cargo#15341) - Temporarily ignore cargo_test_doctest_xcompile_ignores (rust-lang/cargo#15348) - docs: fix typo in the "Shared cache" section (rust-lang/cargo#15346) - Fix some issues with future-incompat report generation (rust-lang/cargo#15345) r? ghost
4 tasks
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-git
Area: anything dealing with git
Command-package
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 performsgit 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