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

Stop depending on PackageId format for node ordering #603

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

mystor
Copy link
Collaborator

@mystor mystor commented Apr 1, 2024

In rust-lang/cargo#12914, the format used for PackageId strings in cargo metadata was changed. This led to a number of test failures due to the ordering of nodes when logging graphs changing relative to earlier versions of cargo.

To work around this issue, the ordering of nodes in the graph was changed to be based on package name and version explicitly, rather than implicitly through the PackageId string. This slightly changes the ordering of some crates in outputs.

In addition, in order to keep tests passing across all versions, the package_id member has been hidden from the JSON graph dump output. This field was already missing for path dependencies.

Fixes #602

In rust-lang/cargo#12914, the format used for
PackageId strings in cargo metadata was changed. This led to a number of
test failures due to the ordering of nodes when logging graphs changing
relative to earlier versions of cargo.

To work around this issue, the ordering of nodes in the graph was
changed to be based on package name and version explicitly, rather than
implicitly through the PackageId string. This slightly changes the
ordering of some crates in outputs.

In addition, in order to keep tests passing across all versions, the
package_id member has been hidden from the JSON graph dump output. This
field was already missing for path dependencies.

Fixes mozilla#602
@mystor mystor requested a review from afranchuk April 1, 2024 21:25
@mystor mystor merged commit a248d43 into mozilla:main Apr 2, 2024
8 checks passed
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

Successfully merging this pull request may close these issues.

Changes in cargo metadata PackageId format leading to test failures
2 participants