Skip to content

Comments

Add a test case and update the error message for required-environments hint#13888

Merged
zanieb merged 1 commit intokonsti/hint-at-required-environmentsfrom
zb/hint
Jun 6, 2025
Merged

Add a test case and update the error message for required-environments hint#13888
zanieb merged 1 commit intokonsti/hint-at-required-environmentsfrom
zb/hint

Conversation

@zanieb
Copy link
Member

@zanieb zanieb commented Jun 6, 2025

Review of #13575

name = "example"
version = "0.1.0"
requires-python = ">=3.13.2"
dependencies = ["wheel_tag_test"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a dumb wheel renamed to have a Windows platform tag.

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
Copy link
Member Author

@zanieb zanieb Jun 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, the "you're on" part will be platform specific still. I guess we can filter that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put a wheel a fantasy platform on packse and be able to run this test on windows too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can just rename that tag to an arbitrary value, what fantasy platforms will we accept?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A fantasy platform like foo doesn't work ofc

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macos_1000_0 maybe? Or similarly ridiculous high glibc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(also tried android_27_arm64_v8a)

Copy link
Member

@konstin konstin Jun 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean I can take that test case over, I'm confident I can find something

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #13890 to track

best,
"tool.uv.required-environments".green()
)?;
write!(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The single path is def nicer.

@zanieb zanieb force-pushed the zb/hint branch 2 times, most recently from f5b4310 to 61e0584 Compare June 6, 2025 18:42
Copy link
Member

@konstin konstin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+ for the main changes, figuring out the wheel tag is non-blocking for me.

@codspeed-hq
Copy link

codspeed-hq bot commented Jun 6, 2025

CodSpeed Instrumentation Performance Report

Merging #13888 will degrade performances by 11.02%

Comparing zb/hint (6fa485c) with konsti/hint-at-required-environments (70db5cb)

Summary

❌ 1 regressions
✅ 11 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
resolve_warm_jupyter 60.4 ms 67.8 ms -11.02%

@zanieb
Copy link
Member Author

zanieb commented Jun 6, 2025

I'll squash into your branch

@zanieb zanieb merged commit 0b7b3e2 into konsti/hint-at-required-environments Jun 6, 2025
82 of 86 checks passed
@zanieb zanieb deleted the zb/hint branch June 6, 2025 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants