Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imply not using cache when invoking sync --update-all #1148

Conversation

flyaroundme
Copy link
Contributor

Hi! This is an attempt to fix #1128 by basically passing the --no-cache to uv command on lockfile generation.
This should work exactly the same (https://github.com/astral-sh/uv/blob/8ae5c2aee3fa22ac7d11337688e4c1bee3748fe3/crates/uv-cache/src/cli.rs#L17) as adding UV_NO_CACHE=true as environment variable as the issue author tried in order to get the desired behaviour.

@zanieb
Copy link
Member

zanieb commented Jun 9, 2024

Interesting. Thanks for putting up a fix. You should be able to use --refresh instead of --no-cache, the latter will disable writes to the cache as well which is overkill. Not entirely sure if there's a better approach than that though without looking into the original issue further.

@zanieb
Copy link
Member

zanieb commented Jun 15, 2024

I'm still a bit confused about why this is necessary though.

@flyaroundme
Copy link
Contributor Author

I'm still a bit confused about why this is necessary though.

Got you, no problem. The use-case is described in the issue, so I thought that made sense

@zanieb
Copy link
Member

zanieb commented Jun 15, 2024

But if there's a new release, uv should upgrade to it without refreshing — unless it's been released in the last 10 minutes (which is the TTL for cache of the available releases). It might make more sense to just expose the --refresh flag in Rye. I think we'll need a clearer picture of the problem before it makes sense to change the uv invocation.

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.

rye sync --update-all should imply UV_NO_CACHE=true
2 participants