Repository navigation
fix(uv): remove uv run from transparent prefixes to fix rewrite conflicts - #2768
Merged
aeppling merged 3 commits intoJul 1, 2026
Merged
Conversation
…icts uv run was listed in both BUILTIN_TRANSPARENT_PREFIXES and RULES, causing the transparent prefix check to win and return None when the inner command (e.g. python script.py) wasn't RTK-supported. Now all uv run commands route through the RULES-based rtk uv path, which delegates to uv_cmd.rs for filtering.
3 tasks done
Contributor
|
Hey @guyoron1 , thanks for this quick correction, LGTM |
aeppling
approved these changes
Jul 1, 2026
2 tasks done
aeppling
added a commit
that referenced
this pull request
Jul 22, 2026
Routing `uv run pytest` to `uv run rtk pytest` recovered the pytest filter, but it made rtk responsible for reporting a tool uv failed to spawn, and rtk reports that badly. With mypy absent, `uv run mypy .` returned exit 1 and "mypy: No issues found" where uv alone returns exit 2 and "Failed to spawn: mypy". Turning a missing type checker into a clean report is worse than the tokens the routing saved. It also resolved rtk through the project venv, where a dependency shipping an `rtk` console script shadows the real binary, confirmed by placing a stub in .venv/bin. Reverting to the pre-existing `rtk uv run pytest` form leaves uv to spawn the tool, so uv keeps reporting its own failures, and keeps #2768's repair intact: classify_command already treats `uv` as an ordinary supported command, so no transparent-prefix special case is needed. Applying the inner tool's filter from outside uv was tried as an alternative and rejected: it rewrote `ruff clean` into `ruff check clean` so the cache was never removed, dropped the tool's stderr on successful runs with no tee written, and reported broken runs as clean. Those root causes are pre-existing defects in the tool filters and are worth fixing on their own merit, after which delegation can be reconsidered. This also removes the conflicts with the open PRs editing rewrite_segment_inner.
5 tasks done
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.
Summary
uv runwas listed in bothBUILTIN_TRANSPARENT_PREFIXESandRULES, causing a routing conflict:uv runand try to match the inner commandpython script.py) wasn't RTK-supported, it returnedNone— no rewrite at alluv run --unknown pytestoruv run -m pytestwere silently droppedFix: Remove
uv runfromBUILTIN_TRANSPARENT_PREFIXESso alluv runcommands route through the RULES-basedrtk uvpath, which delegates touv_cmd.rsfor proper filtering.Also fixes a compilation issue where
print_with_hintsignature changed (addedguard_rawarg) butuv_cmd.rswasn't updated.Changes
uv runfromBUILTIN_TRANSPARENT_PREFIXESinregistry.rsguard_rawarg toprint_with_hintinuv_cmd.rs(signature fix)uv run pytest→rtk uv run pytest(notuv run rtk pytest)BUILTIN_TRANSPARENT_PREFIXESarrayTest plan
uv runrewrite tests to match new routing behavioruv run --unknown pytestanduv run -m pytestnow rewrite correctly instead of returningNonecargo checkpasses