Skip to content

fix: use new uv caching mechanism to determine freshness#5254

Merged
baszalmstra merged 3 commits intoprefix-dev:mainfrom
tdejager:feat/uv-cache-for-freshness
Jan 13, 2026
Merged

fix: use new uv caching mechanism to determine freshness#5254
baszalmstra merged 3 commits intoprefix-dev:mainfrom
tdejager:feat/uv-cache-for-freshness

Conversation

@tdejager
Copy link
Contributor

@tdejager tdejager commented Jan 9, 2026

Description

Fixes the situation where you have a non-editable python project and it keeps reverting to the cached version. I've not seen this in the issue tracker yet. But I've reproduced it myself.

If you have something like

[pypi-dependencies]
foo = { path = "." }

Then it does a non-editable install, changing any source files not really changes anything though. This used to work at some point but has regressed. This updates the code to use the new caching mechanisms into account.

We can now make a project like this an use the uv cache keys for autmated updating

[project]
name = "bingo"
version = "0.1.0"
requires-python = ">= 3.11"
authors = [{ name = "Tim de Jager", email = "tdejager89@gmail.com" }]
dependencies = []

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.pixi.workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["osx-arm64"]

[tool.pixi.pypi-dependencies]
bingo = { path = "." }

[tool.pixi.tasks]

[tool.uv]
cache-keys = [{ file = "src/**/*.py" }]

This project will now be rebuilt any time a *.py file changes, and a new wheel will be created and cached.

How Has This Been Tested?

  • Automated tests
  • Locally.

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: Claude Opus 4.5

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.

@tdejager tdejager force-pushed the feat/uv-cache-for-freshness branch from c4554cd to 183f51c Compare January 9, 2026 15:01
@tdejager tdejager force-pushed the feat/uv-cache-for-freshness branch from 183f51c to a354032 Compare January 9, 2026 15:53
@tdejager tdejager marked this pull request as ready for review January 9, 2026 16:06
@tdejager tdejager requested a review from baszalmstra January 9, 2026 16:06
@cpcloud
Copy link

cpcloud commented Jan 9, 2026

#5256 might be related, seems very similar.

@baszalmstra baszalmstra merged commit 30369cf into prefix-dev:main Jan 13, 2026
75 of 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.

3 participants