-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix some issues with future-incompat report generation #15345
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
This updates some tests to include the full output for both a local crate and a dependency.
This fixes a problem introduced by rust-lang#11648 where the future-incompat report will tell you to run with an `--id` flag with the wrong value if the report is already cached. The solution is to add a method to determine which ID to use for the suggestions *before* attempting to save the report.
This removes the suggestion to update dependencies when the future incompat error comes from the local crate. It doesn't make sense to suggest that.
This output was never tested.
The udpate_message already has a newline when it is there. When it is an empty string, it ends up adding an unnecessary blank line.
r? @weihanglo rustbot has assigned @weihanglo. Use |
weihanglo
approved these changes
Mar 22, 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.
Thanks for the fix and cleanup!
Cool |
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
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-build-execution
Area: anything dealing with executing the compiler
A-future-incompat
Area: future incompatible reporting
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.
This fixes various issues with the future-incompat report. In particular, it addresses the off-by-one for the
--id
flag when the report is already cached, and it doesn't recommend updating dependencies when the error comes from a local crate. See each commit for more details.Fixes #15337