Skip to content

build: Install uv through brew - #6351

Open
loewenheim wants to merge 3 commits into
masterfrom
sebastian/devenv-uv
Open

build: Install uv through brew#6351
loewenheim wants to merge 3 commits into
masterfrom
sebastian/devenv-uv

Conversation

@loewenheim

Copy link
Copy Markdown
Contributor

I'm getting a warning on every devenv sync saying that installing uv through devenv is no longer supported:

❯ devenv sync
[…]
!!! devenv-managed uv is deprecated! run `brew install uv` !!!

So I'm removing that code and adding uv to the brewfile instead.

@loewenheim
loewenheim requested a review from a team as a code owner September 3, 2026 12:18
@loewenheim loewenheim self-assigned this Sep 3, 2026
Comment thread devenv/sync.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bec4311. Configure here.

Comment thread devenv/sync.py
Comment thread devenv/sync.py Outdated
Comment thread devenv/sync.py

# clean up leftover devenv uv install
binroot = fs.ensure_binroot(reporoot)
uv.uninstall(binroot)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The script unconditionally uninstalls uv but only provides a re-installation path for macOS, breaking the development environment setup for Linux users by leaving uv missing.
Severity: HIGH

Suggested Fix

Provide a cross-platform installation method for uv. This could involve adding a specific installation step for Linux, similar to the previous implementation that downloaded pre-compiled binaries, or using a package manager available on Linux.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: devenv/sync.py#L12

Potential issue: The script unconditionally calls `uv.uninstall(binroot)` on line 12,
removing the `uv` executable from the development environment on all platforms. However,
the subsequent installation of `uv` is handled by `brew bundle`, which is only executed
on macOS due to an `if constants.DARWIN` check. On Linux systems, `uv` is removed but
never re-installed. This causes the script to fail later at a check for the `uv`
executable (`shutil.which("uv")`), resulting in a `SystemExit` with a misleading error
message suggesting the user run `direnv allow`, which will not resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants