Skip to content

Sort crate dependencies before adding to index #6317

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 13, 2023

Conversation

arlosi
Copy link
Contributor

@arlosi arlosi commented Apr 12, 2023

We sorted the crate dependencies when we did the normalization, but newly published crates do not get their dependencies sorted.

  • Updates the Ord impl on Dependency so all fields are included to ensure a total order.
  • Adds a test that verifies newly published crates get sorted (verified this failed before the fix).

r? @Turbo87

Related:

@Turbo87 Turbo87 added C-bug 🐞 Category: unintended, undesired behavior A-backend ⚙️ labels Apr 12, 2023
@Turbo87
Copy link
Member

Turbo87 commented Apr 12, 2023

I'll take a close look tomorrow. Do you think it would be possible to write a regression test for this?

Also ensure that the sorting of dependencies uses all fields.
@arlosi
Copy link
Contributor Author

arlosi commented Apr 12, 2023

@Turbo87 Thanks. Test added.

Copy link
Member

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

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

looks good, thank you!

I guess that means we might have to run another normalization pass for the crates that have been published since the last time 🙈

@Turbo87 Turbo87 merged commit aeda739 into rust-lang:master Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-bug 🐞 Category: unintended, undesired behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants