Skip to content

fix(uv): re-sync editable on Rust edits via cache-keys#4

Merged
zackees merged 1 commit into
mainfrom
fix/uv-cache-keys-rs-resync
Jun 22, 2026
Merged

fix(uv): re-sync editable on Rust edits via cache-keys#4
zackees merged 1 commit into
mainfrom
fix/uv-cache-keys-rs-resync

Conversation

@zackees

@zackees zackees commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

Default uv only watches pyproject.toml for cache invalidation, so an editable install silently leaves a stale _native.pyd after .rs edits. uv run then executes against pre-edit Rust code with no warning.

Add [tool.uv] cache-keys globs covering Cargo.toml/.lock, rust-toolchain.toml, and crates//*.rs / crates//Cargo.toml so uv run triggers re-sync on real source changes.

Ported from fbuild#661. Refs #2 — item (7).

Test plan

  • pyproject.toml parses (verified via subsequent install path; will be exercised again on first uv sync in CI).

🤖 Generated with Claude Code

Default uv only watches pyproject.toml for cache invalidation, so an
editable install silently leaves a stale `_native.pyd` after .rs edits.
`uv run` then executes against pre-edit Rust code with no warning — a
particularly silent footgun in a maturin-backed project where the .pyd
is invisible to the developer.

Add `[tool.uv] cache-keys` globs that cover Cargo.toml, Cargo.lock,
rust-toolchain.toml, and crates/**/*.rs / crates/**/Cargo.toml. Now
`uv run` triggers re-sync on real source changes.

Correctness fix, not raw speed — but the fast iteration loop depends
on it. Ported from FastLED/fbuild#661.

Refs #2 (item 7).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@zackees zackees merged commit 12c3e5f into main Jun 22, 2026
7 of 8 checks passed
@zackees zackees deleted the fix/uv-cache-keys-rs-resync branch June 22, 2026 06:01
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