Add a test case and update the error message for required-environments hint#13888
Add a test case and update the error message for required-environments hint#13888zanieb merged 1 commit intokonsti/hint-at-required-environmentsfrom
required-environments hint#13888Conversation
| name = "example" | ||
| version = "0.1.0" | ||
| requires-python = ">=3.13.2" | ||
| dependencies = ["wheel_tag_test"] |
There was a problem hiding this comment.
This is just a dumb wheel renamed to have a Windows platform tag.
crates/uv/tests/it/sync.rs
Outdated
| Resolved 2 packages in [TIME] | ||
| error: Distribution `wheel-tag-test==0.1.0 @ registry+../../../../../../workspace/uv/scripts/links` can't be installed because it doesn't have a source distribution or wheel for the current platform | ||
|
|
||
| hint: You're on macOS (`macosx_14_0_arm64`), but `wheel-tag-test` (v0.1.0) only has wheels for the following platform: `win_amd64`; consider adding your platform to `tool.uv.required-environments` to ensure uv resolves to a version with compatible wheels |
There was a problem hiding this comment.
Hm, the "you're on" part will be platform specific still. I guess we can filter that.
There was a problem hiding this comment.
Can we put a wheel a fantasy platform on packse and be able to run this test on windows too?
There was a problem hiding this comment.
We can just rename that tag to an arbitrary value, what fantasy platforms will we accept?
There was a problem hiding this comment.
A fantasy platform like foo doesn't work ofc
There was a problem hiding this comment.
macos_1000_0 maybe? Or similarly ridiculous high glibc.
There was a problem hiding this comment.
I tried that as well as like macos_11_0_fat but the hint doesn't display then. Sort of hesitant to debug it at the moment, maybe we should just open a follow-up?
There was a problem hiding this comment.
(also tried android_27_arm64_v8a)
There was a problem hiding this comment.
I mean I can take that test case over, I'm confident I can find something
| best, | ||
| "tool.uv.required-environments".green() | ||
| )?; | ||
| write!( |
There was a problem hiding this comment.
I'm willing to have two messages still, but if we do I think it should be in this order, i.e.,
hint: There are only wheels for the following platforms ..
hint: Consider adding your platform to ...
I interested in seeing how a single hint feels too though
f5b4310 to
61e0584
Compare
konstin
left a comment
There was a problem hiding this comment.
r+ for the main changes, figuring out the wheel tag is non-blocking for me.
CodSpeed Instrumentation Performance ReportMerging #13888 will degrade performances by 11.02%Comparing Summary
Benchmarks breakdown
|
|
I'll squash into your branch |
0b7b3e2
into
konsti/hint-at-required-environments
Review of #13575