Skip to content

Idiomatic Windows paths #7008

Description

@2-5

The paths used by uv on Windows are not very idiomatic.

Clean install:

irm https://astral.sh/uv/install.ps1 | iex
uv tool install ruff

Outcome:

uv.exe      C:\Users\USER\.cargo\bin
uv cache    C:\Users\USER\AppData\Local\uv\cache
ruff venv   C:\Users\USER\AppData\Roaming\uv\tools\ruff
ruff.exe    C:\Users\USER\.local\bin\ruff.exe

# not actually installed
uv.toml     C:\Users\USER\AppData\Roaming\uv\uv.toml

~/.cargo/bin is not ideal, but I guess that ship has sailed since it's the Rust default.

I think the tools venvs dir should be moved from AppData\Roaming (%APPDATA%) to AppData\Local (%LOCALAPPDATA%). You're not supposed to store binaries in the AppData\Roaming directory, it's more of a .config kind of directory. Also, the tool venv from AppData\Roaming will use the uv cache from AppData\Local, this will break in a corporate setup, where the AppData\Roaming can "roam" (a sort of a network share) - you'll login into a new machine with your domain user, the AppData\Roaming will be copied/mounted there, but there will be no corresponding uv cache in the AppData\Local directory.

The ~/.local/bin choice is terrible on Windows, it pollutes the home directory. I think it should also go in the AppData\Local directory.

My proposal for the paths:

uv.exe      C:\Users\USER\.cargo\bin
uv cache    C:\Users\USER\AppData\Local\uv\cache
ruff venv   C:\Users\USER\AppData\Local\uv\tools\ruff
ruff.exe    C:\Users\USER\AppData\Local\uv\bin\ruff.exe

uv.toml     C:\Users\USER\AppData\Roaming\uv\uv.toml

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-decisionUndecided if this should be donewindowsSpecific to the Windows platform

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions