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

docs: Use proper environment variables for Windows #6433

Merged
merged 4 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ pub enum CacheCommand {
///
///
/// By default, the cache is stored in `$XDG_CACHE_HOME/uv` or `$HOME/.cache/uv` on Unix and
/// `{FOLDERID_LocalAppData}\uv\cache` on Windows.
Copy link
Member

Choose a reason for hiding this comment

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

Would be you be willing to update all of the FOLDERID_ references? I think there are some more.

You'll need to update the generated reference with cargo dev generate-all

/// `%LOCALAPPDATA%\uv\cache` on Windows.
///
/// When `--no-cache` is used, the cache is stored in a temporary directory and discarded when
/// the process exits.
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ uv determines the cache directory according to, in order:
2. The specific cache directory specified via `--cache-dir`, `UV_CACHE_DIR`, or
[`tool.uv.cache-dir`](../reference/settings.md#cache-dir).
3. A system-appropriate cache directory, e.g., `$XDG_CACHE_HOME/uv` or `$HOME/.cache/uv` on Unix and
`{FOLDERID_LocalAppData}\uv\cache` on Windows
`%LOCALAPPDATA%\uv\cache` on Windows

!!! note

Expand All @@ -104,4 +104,4 @@ uv determines the cache directory according to, in order:

It is important for performance for the cache directory to be located on the same file system as the
Python environment uv is operating on. Otherwise, uv will not be able to link files from the cache
into the environment and will instead need to fallback to slow copy operations.
into the environment and you will instead need to use copy mode with slow operations.
Copy link
Member

Choose a reason for hiding this comment

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

Why this change? We're talking about uv here, e.g., "uv will instead need to fallback to slow copy operations"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

by reading fallback, initially I thought it will automatically do it for us, because imo it means: if some progress failed do X instead.

Copy link
Member

Choose a reason for hiding this comment

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

It does / should do it automatically for you?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then I think Warning message could be improved to mention which mode it fallbacking, in #6397 it says:

         If the cache and target directories are on different filesystems, hardlinking may not be supported.
         If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.

Instead:

         Cache and target directories are on different filesystems, hardlinking not supported, switched to copy mode.
         If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.

Copy link
Member

Choose a reason for hiding this comment

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

Probably worth discussion elsewhere — we have too many issues to go through right now to discuss unrelated changes out of context.

Loading