Skip to content

fix(unit-graph): switch to Package ID Spec #15447

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

Merged
merged 1 commit into from
Apr 23, 2025

Conversation

brvtalcake
Copy link
Contributor

@brvtalcake brvtalcake commented Apr 22, 2025

What does this PR try to resolve?

Fixes #15445, where there were still differences between the format of package ids of "cargo metadata and build JSON messages", and --unit-graph package ids.

How should we test and review this PR?

Everything compiles correctly (and outputs what's expected). I also fixed the testcases

@rustbot
Copy link
Collaborator

rustbot commented Apr 22, 2025

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 22, 2025
@brvtalcake brvtalcake marked this pull request as ready for review April 22, 2025 23:20
@weihanglo weihanglo changed the title attempts to fix https://github.com/rust-lang/cargo/issues/15445#issue-3011613257 fix(unit-graph): switch to Package ID Spec Apr 23, 2025
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@weihanglo
Copy link
Member

Would you mind cleaning up commits?
Our contributor guide follows atomic commit patterns, and what to make sure every commit pass CI.
(not a hard requirement though)

Copy link
Contributor Author

@brvtalcake brvtalcake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

You're welcome (that was really just two lines but at least it's done)

EDIT: yes I can clean the unfinished commits

@weihanglo
Copy link
Member

Feel free to force-push or do whatever makes sense :)

changes summary :
	- change the `pkg_id` field of `struct SerializedUnit<'a>` to be `PackageIdSpec` instead of `PackageId`
	- change the unit-graph testcases to match the changes

(cleaning previous commits so every commit passes CI checks, as required)
@brvtalcake brvtalcake force-pushed the pkgidspec-in-unit_graph branch from 918ec15 to 55952a3 Compare April 23, 2025 11:22
@brvtalcake
Copy link
Contributor Author

OK, it should be better now (I had a bit of trouble figuring out that I just had to force-push it)

@weihanglo weihanglo added this pull request to the merge queue Apr 23, 2025
Merged via the queue into rust-lang:master with commit 872b92e Apr 23, 2025
23 checks passed
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 27, 2025
Update cargo

10 commits in d811228b14ae2707323f37346aee3f4147e247e6..7918c7eb59614c39f1c4e27e99d557720976bdd7
2025-04-15 15:18:42 +0000 to 2025-04-27 09:44:23 +0000
- overriding-dependencies.md: better readability (rust-lang/cargo#15459)
- source-replacement.md: fix typo (rust-lang/cargo#15458)
- Stabilize automatic garbage collection. (rust-lang/cargo#14287)
- Update doctest xcompile flags (rust-lang/cargo#15455)
- fix: Suggest similar looking feature names when feature is missing (rust-lang/cargo#15454)
- fix(unit-graph): switch to Package ID Spec (rust-lang/cargo#15447)
- chore(deps): update cargo-semver-checks to v0.41.0 (rust-lang/cargo#15446)
- Implement RFC3695: Allow boolean literals as cfg predicates (rust-lang/cargo#14649)
- chore: remove duplicate word in comment (rust-lang/cargo#15437)
- Fix formatting of CliUnstable parsing (rust-lang/cargo#15434)

r? ghost
@rustbot rustbot added this to the 1.88.0 milestone Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--unit-graph outputs PackageId instead of PackageIdSpec
4 participants