fix: evaluate extra == markers per-extra with OR semantics#1099
Open
xangcastle wants to merge 1 commit into
Open
fix: evaluate extra == markers per-extra with OR semantics#1099xangcastle wants to merge 1 commit into
xangcastle wants to merge 1 commit into
Conversation
✨ Aspect Workflows Tasks📅 Thu Jun 11 00:14:08 UTC 2026 ✅ 7 successful tasks
⏱ Last updated Thu Jun 11 00:53:41 UTC 2026 · 📊 GitHub API quota 490/15,000 (3% used, resets in 17m, throttle 3×) |
f915ae6 to
5209926
Compare
jbedard
approved these changes
Jun 11, 2026
Member
|
Please add the same tests (and possibly fixes) to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_decide_marker_implwas joining multiple extras into a single comma-separated string before passing it to the PEP-508 evaluator, soextras = ["dev", "other"]becameextra = "dev,other"which never matched a marker likeextra == 'dev', causing optional dependencies gated by extras to be silently excluded.This PR fixes that by evaluating the marker once per extra and ORing the results, so a dependency is included if any of the active extras matches. It also adds venv-derived extras inference: since generated decide_marker calls never pass extras explicitly, the fix now reads the active venv name from the
_venvflag and extracts matching extra values from the marker string, which handles conflict group markers of the formextra == 'group-N-project-venvname'.Tests added to
pep508_evaluate_test.bzlcover positive/negative extra == cases including the comma-join regression, and new decide_marker targets in BUILD.bazel exercise the OR evaluation path directly.Changes are visible to end-users: no
Test plan