5
0
mirror of https://github.com/astral-sh/setup-uv.git synced 2025-12-15 11:07:14 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Kevin Stillhammer
cd4ccfa557 Add FAQ on changed cache and cache upload behavior 2025-07-05 11:51:29 +02:00
Kevin Stillhammer
8021b967f0 Do not warn when version not in manifest-file
This will spam the GitHub summary with warnings as soon as a new version is released and no new setup-uv version containing this version in the distributed manifest-file is released
2025-06-25 09:21:00 +02:00
3 changed files with 19 additions and 2 deletions

View File

@@ -542,6 +542,23 @@ Running `actions/checkout` after `setup-uv` **is not supported**.
No, `setup-uv` alone wont install any libraries from your `pyproject.toml` or `requirements.txt`, it only sets up `uv`.
You should run `uv sync` or `uv pip install .` separately, or use `uv run ...` to ensure necessary dependencies are installed.
### Why is a changed cache not detected and not the full cache uploaded?
When `setup-uv` starts it has to know whether it is better to download an existing cache
or start fresh and download every dependency again.
It does this by using a combination of hashes calculated on the contents of e.g. `uv.lock`.
By calculating these hashes and combining them in a key `setup-uv` can check
if an uploaded cache exists for this key.
If yes (e.g. contents of `uv.lock` did not change since last run) the dependencies in the cache
are up to date and the cache will be downloaded and used.
Details on determining which files will lead to different caches can be read under
[cache-dependency-glob](#cache-dependency-glob)
Some dependencies will never be uploaded to the cache and will be downloaded again on each run
as described in [disable-cache-pruning](#disable-cache-pruning)
## Acknowledgements
`setup-uv` was initially written and published by [Kevin Stillhammer](https://github.com/eifinger)

2
dist/setup/index.js generated vendored
View File

@@ -124726,7 +124726,7 @@ async function downloadVersionFromGithub(serverUrl, platform, arch, version, che
async function downloadVersionFromManifest(manifestUrl, platform, arch, version, checkSum, githubToken) {
const downloadUrl = await (0, version_manifest_1.getDownloadUrl)(manifestUrl, version, arch, platform);
if (!downloadUrl) {
core.warning(`manifest-file does not contain version ${version}, arch ${arch}, platform ${platform}. Falling back to GitHub releases.`);
core.info(`manifest-file does not contain version ${version}, arch ${arch}, platform ${platform}. Falling back to GitHub releases.`);
return await downloadVersionFromGithub("https://github.com", platform, arch, version, checkSum, githubToken);
}
return await downloadVersion(downloadUrl, `uv-${arch}-${platform}`, platform, arch, version, checkSum, githubToken);

View File

@@ -64,7 +64,7 @@ export async function downloadVersionFromManifest(
platform,
);
if (!downloadUrl) {
core.warning(
core.info(
`manifest-file does not contain version ${version}, arch ${arch}, platform ${platform}. Falling back to GitHub releases.`,
);
return await downloadVersionFromGithub(