Skip to content

add uv cache keys to project template#3277

Open
davidhewitt wants to merge 1 commit into
PyO3:mainfrom
davidhewitt:uv-cache-keys
Open

add uv cache keys to project template#3277
davidhewitt wants to merge 1 commit into
PyO3:mainfrom
davidhewitt:uv-cache-keys

Conversation

@davidhewitt

Copy link
Copy Markdown
Member

I find myself often using uv run to build / test projects these days.

Every time I forget that uv has its own caching layer that is by default not quite right for Rust projects. Adding cache-keys configuration to be derived from the Rust src helps a lot with this.

Might not be quite right for "python" project layout - we might want to tweak this before merge? Just wanted to kick off the discussion.

{ file = "pyproject.toml" },
{ file = "Cargo.toml" },
{ file = "Cargo.lock" },
{ file = "**/*.rs" },

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That glob would make uv iterate over all files and directories in the project dir, we should use something more targeted: https://github.com/astral-sh/uv/blob/3010295ae7ff572de459987ad70db315a62ecd61/pyproject.toml#L117-L124

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.

2 participants