-
Notifications
You must be signed in to change notification settings - Fork 899
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
Allow users to mark platforms as "required" for wheel coverage #10067
base: main
Are you sure you want to change the base?
Conversation
Uhh trying Fork on... Add heuristic Gate to local versions Remove KnownMarkers Add required platform support
59b6690
to
eeb249d
Compare
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.
I like this!
@@ -196,6 +199,15 @@ impl Display for IncompatibleDist { | |||
IncompatibleWheel::RequiresPython(python, _) => { | |||
write!(f, "Python {python}") | |||
} | |||
IncompatibleWheel::MissingPlatform(marker) => { | |||
if let Some(platform) = KnownPlatform::from_marker(*marker) { | |||
write!(f, "no {platform}-compatible wheels") |
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.
Nice
@@ -273,6 +273,36 @@ package = false | |||
|
|||
--- | |||
|
|||
### [`required-platforms`](#required-platforms) {: #required-platforms } |
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.
I think it might help if the docs specifically "compared and contrasted" required-platforms
with environments
. They do different things of course, but they take the same inputs and I could see end users being confused by them.
(What I tend to do in docs is to mention the other in the docs and contrast them. e.g., mention environments
in this section and required-platforms
in the environments
section. That way, users see the contrasting doc regardless of where they look.)
Another case that this could solve (but would require user intervention): #10085. Ideally, I think we should be able to give users a hint when the sync fails -- like "There are no available wheels for this platform, add |
Summary
This PR revives #10017, which might be viable now that we don't enforce any platforms by default.
The basic idea here is that users can mark certain platforms as required (empty, by default). When resolving, we ensure that the specified platforms have wheel coverage, backtracking if not.
For example, to require that we include a version of PyTorch that supports Intel macOS:
Other than that, the forking is identical to past iterations of this PR.
This would give users a way to resolve the tail of issues in #9711, but with manual opt-in to supporting specific platforms.