-
Notifications
You must be signed in to change notification settings - Fork 995
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
Error when workspace contains conflicting Python requirements #10841
base: main
Are you sure you want to change the base?
Conversation
.as_ref() | ||
.map(find_requires_python) | ||
.transpose()? | ||
.flatten() |
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 is kind of gross, but struggling to improve it.
.map(VersionSpecifiers::clone) | ||
.collect::<BTreeSet<_>>(); | ||
Err(ProjectError::DisjointRequiresPython( | ||
specifiers.into_iter().collect(), |
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 just includes all of the specifiers.
----- stdout ----- | ||
|
||
----- stderr ----- | ||
error: The workspace contains conflicting Python requirements: `==3.10`, `>=3.12` |
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.
It'd be ideal to include sources here, if feasible. Perhaps as a future change.
Maybe like
error: The workspace contains conflicting Python requirements:
- project: `>=3.12`
- child: `==3.10`
Summary
If members define disjoint Python requirements, we should error. Right now, it seems that it maps to unbounded and leads to weird behavior.
Closes #10835.