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

Treat ARM wheels as higher-priority than universal #1843

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Feb 22, 2024

Summary

We need to take care to keep wheel tags in "priority order" (e.g., we should prefer ARM wheels over universal wheels). However... it looks like we've had a .sort() in here all along, that risks throwing off the ordering?

Closes #1840.

Test Plan

ensure that rlax uses the ARM wheel rather than the universal wheel:

  • cargo run venv
  • cargo run pip install rlax
  • import rlax

@charliermarsh charliermarsh marked this pull request as ready for review February 22, 2024 01:11
@@ -253,6 +253,18 @@ impl TryFrom<usize> for TagPriority {
}
}

impl Ord for TagPriority {
fn cmp(&self, other: &Self) -> cmp::Ordering {
self.0.cmp(&other.0).reverse()
Copy link
Member Author

Choose a reason for hiding this comment

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

(Not sure if there's a better way to do this.)

@charliermarsh
Copy link
Member Author

This will probably fix a variety of ARM failures.

@charliermarsh charliermarsh added the bug Something isn't working label Feb 22, 2024
@charliermarsh
Copy link
Member Author

@BurntSushi caught that this is the wrong fix -- there's a .reverse() I missed at the top, the logic is right.

What's wrong is the priority ordering of some tags.

@charliermarsh charliermarsh marked this pull request as draft February 22, 2024 01:24
@charliermarsh charliermarsh marked this pull request as ready for review February 22, 2024 01:36
@charliermarsh charliermarsh enabled auto-merge (squash) February 22, 2024 01:38
@charliermarsh charliermarsh merged commit 831ab45 into main Feb 22, 2024
7 checks passed
@charliermarsh charliermarsh deleted the charlie/priority branch February 22, 2024 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't import rlax library when installed via uv install
2 participants