-
Notifications
You must be signed in to change notification settings - Fork 970
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
Show 'closest' tag in tag incompatibility error messages #10534
Conversation
let Ok(abi) = AbiTag::from_str(abi) else { | ||
continue; | ||
}; | ||
for (wheel, _) in &self.0.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.
This is really, really inefficient... It's O(M*N) where M is the number of compatible tags and N is the number of wheels. But like... it will only run once, in the error reporting, so I think it's kind of fine?
05585ea
to
fe9816e
Compare
3a09673
to
c904720
Compare
fe9816e
to
d577fa4
Compare
c904720
to
c521c68
Compare
d577fa4
to
4af73b8
Compare
Try to thread through Add errors Iterate on tags Add ABI Tag Add impls Use context instead
c521c68
to
9190de2
Compare
4af73b8
to
8bee4ef
Compare
if let Some((py, abi, platform)) = closest { | ||
write!( | ||
f, | ||
"{}{} Wheels are available for `{}` ({}) with the following ABI tag{s}: {}. The closest match is `{}`.", |
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 @konsti had a nice suggestion, to say something like: "A wheel exists for a different architecture" (#2777 (comment))
crates/uv/tests/it/pip_compile.rs
Outdated
hint: Wheels are available for `open3d` (v0.18.0) on the following platforms: `macosx_11_0_x86_64`, `macosx_13_0_arm64`, `manylinux_2_27_aarch64`, `manylinux_2_27_x86_64`, `win_amd64` | ||
hint: Wheels are available for `open3d` (v0.18.0) on the following platforms: `macosx_11_0_x86_64`, `macosx_13_0_arm64`, `manylinux_2_27_aarch64`, `manylinux_2_27_x86_64`, `win_amd64`. The closest match is `cp310-cp310-win_amd64`. |
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'm not sure these help.
In this example, I get confused by the additional tags (e.g., cp310
). Maybe it'd be helpful as "The closest match to your platform (e.g., ...) is ...", but I'm not sure I follow the user experience this solves.
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.
Separately, how is cp310-cp310-win_amd64
the closest match to manylinux_2_17_x86_64
?
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 should probably be cp310-cp310-manylinux_2_27_x86_64
. You don't find that helpful?
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 don't think so. Maybe if I also had a Python compatibility error? I'm just not sure what I could do with that information, and a quick scan of the available tags is already showing where I've gone wrong.
What does knowing the closest tag change? Does it make a particular action clearer?
hint: Wheels are available for `package-a` (v1.0.0) on the following platform: `macosx_10_0_ppc64` | ||
hint: Wheels are available for `package-a` (v1.0.0) on the following platform: `macosx_10_0_ppc64`. The closest match is `py3-none-macosx_10_0_ppc64`. |
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 imagine one wheel platform is rare, but should we show a closest match in this case?
f521ff4
to
614965b
Compare
Just gonna close this. Other more impactful things to improve in these errors. |
Summary
Here's an example from
torch
on my M3: