-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Refactor uv-toolchain::platform
to use target-lexicon
#4236
Conversation
b25aa0b
to
b337590
Compare
def normalize_os(os): | ||
return OS_MAP.get(os, os) | ||
return os |
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.
Just keeping this for consistency for now
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.
Setting the right default libc on linux is critical, the rest looks good
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.
This file is one huge block, do we know if this affects compilation times?
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.
No clue, is there a good way to measure?
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.
We could compare compile times with a dummy, but there aren't any good tools around.
b337590
to
b117095
Compare
b117095
to
8185c16
Compare
See #4242 for proper musl support. |
Closes #3857
Instead of using custom
Arch
,Os
, andLibc
types I just usetarget-lexicon
's which enumerate way more variants and implement display and parsing. We use a wrapper type to represent a couple special cases to support the "x86" alias for "i686" and "macos" for "darwin". Alternatively we could try to use ourplatform-tags
types but those capture more information (like operating system versions) that we don't have for downloads.As discussed in #4160, this is not sufficient for proper libc detection but that work is larger and will be handled separately.