Skip to content

fix(uv): fail clearly when no conflict variant is selected - #373

Merged
jvolkman merged 4 commits into
mainfrom
fix/uv-no-variant-selected
Oct 18, 2026
Merged

jvolkman merged 4 commits into
mainfrom
fix/uv-no-variant-selected

Conversation

@jvolkman

Copy link
Copy Markdown
Owner

Summary

  • Add pycross_no_variant_selected rule in pycross/private/variant_resolver.bzl (providing DefaultInfo and PyInfo) that fails analysis with a user-actionable message.
  • Emit _no_variant_<set> in _lock/BUILD.bazel for each conflict set without a default variant, listing the --@<member>//_variants:<qname> flags to choose from.
  • Wire @<ws>//_lock:_no_variant_<set> as the //conditions:default fallback in thin_package_repo.bzl (_target_select and _emit_maybe_alias) for unselected conflict variant sets while preserving no_match_error / _empty_library for fork-only (res_*) selects and default variant behavior.
  • Add unit coverage in tests/unit/test_thin_package_repo.bzl and assert Set one of error output for both //:test_variant_a and //... in tests/e2e/uv_conflicts/run.sh.

Emit a pycross_no_variant_selected fallback target per conflict set without a default variant and wire it as the //conditions:default fallback in thin_package_repo select() expressions instead of no_match_error or _empty_library, restoring the clear 'Set one of: ...' analysis failure when no conflict variant flag is set.
…ants

Add an explicit _unselected_<set> config_setting matching FeatureFlagInfo(value = "") and wire it into thin_package_repo select() expressions so that selected variants whose fork does not match the target platform still fall through to //conditions:default (no_match_error / _empty_library) rather than failing with the unselected-variant error.
Make pycross_no_variant_selected respect //pycross/settings:unavailable_package_mode so analysis-only consumers (cquery/aquery/aspects) succeed under fail_at_execution while builds and tests fail at execution with the same 'Set one of' message.
@jvolkman
jvolkman merged commit a2d1575 into main Oct 18, 2026
76 checks passed
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.

1 participant