Add src to default cache keys (#12062)
## Summary This has come up a few times, so it seems worth addressing. If you migrate from a flat layout to a `src` layout or vice versa, we now invalidate the package metadata. Closes https://github.com/astral-sh/uv/issues/12047
This commit is contained in:
@@ -477,10 +477,11 @@ The keys to consider when caching builds for the project.
|
||||
|
||||
Cache keys enable you to specify the files or directories that should trigger a rebuild when
|
||||
modified. By default, uv will rebuild a project whenever the `pyproject.toml`, `setup.py`,
|
||||
or `setup.cfg` files in the project directory are modified, i.e.:
|
||||
or `setup.cfg` files in the project directory are modified, or if a `src` directory is
|
||||
added or removed, i.e.:
|
||||
|
||||
```toml
|
||||
cache-keys = [{ file = "pyproject.toml" }, { file = "setup.py" }, { file = "setup.cfg" }]
|
||||
cache-keys = [{ file = "pyproject.toml" }, { file = "setup.py" }, { file = "setup.cfg" }, { dir = "src" }]
|
||||
```
|
||||
|
||||
As an example: if a project uses dynamic metadata to read its dependencies from a
|
||||
|
||||
Reference in New Issue
Block a user