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

BUG: crash in uv sync --no-build --no-install-project #7247

Closed
neutrinoceros opened this issue Sep 10, 2024 · 1 comment · Fixed by #7277
Closed

BUG: crash in uv sync --no-build --no-install-project #7247

neutrinoceros opened this issue Sep 10, 2024 · 1 comment · Fixed by #7277
Assignees
Labels
bug Something isn't working

Comments

@neutrinoceros
Copy link

XY problem disclaimer: what I was really trying to accomplish here was installing dependencies only, ref #1516

I understand that uv sync --no-build is a bit self-contradictory because it requires building the project itself but forbids building anything, but I was still surprised that adding --no-install-project didn't help

reprod

❯ mkdir test_pkg && cd test_pkg
❯ uv init --lib
Initialized project `test-pkg`
❯ uv sync --no-build --no-install-project --verbose
DEBUG uv 0.4.8 (Homebrew 2024-09-09)
DEBUG Found project root: `/private/tmp/test_pkg`
DEBUG No workspace root found, using project root
DEBUG Reading requests from `/private/tmp/test_pkg/.python-version`
DEBUG Searching for Python 3.12 in managed installations or system path
DEBUG Searching for managed installations at `/Users/clm/Library/Application Support/uv/python`
DEBUG Found managed installation `cpython-3.12.5-macos-aarch64-none`
DEBUG Found `cpython-3.12.5-macos-aarch64-none` at `/Users/clm/Library/Application Support/uv/python/cpython-3.12.5-macos-aarch64-none/bin/python3` (managed installations)
Using Python 3.12.5
Creating virtualenv at: .venv
DEBUG Using request timeout of 30s
DEBUG Starting clean resolution
DEBUG Allowing build for editable source distribution: test-pkg @ file:///private/tmp/test_pkg
DEBUG Found static `pyproject.toml` for: test-pkg @ file:///private/tmp/test_pkg
DEBUG No workspace root found, using project root
DEBUG Solving with installed Python version: 3.12.5
DEBUG Solving with target Python version: >=3.12
DEBUG Adding direct dependency: test-pkg*
DEBUG Searching for a compatible version of test-pkg @ file:///private/tmp/test_pkg (*)
DEBUG Tried 1 versions: test-pkg 1
DEBUG Split universal resolution took 0.000s
Resolved 1 package in 1ms
error: distribution test-pkg==0.1.0 @ editable+. can't be installed because it is marked as `--no-build` but has no binary distribution

Is this intended, and is there a way around it ?

$ uv --version
uv 0.4.8 (Homebrew 2024-09-09)
@charliermarsh
Copy link
Member

Thanks, this is a bug.

@charliermarsh charliermarsh self-assigned this Sep 10, 2024
@charliermarsh charliermarsh added the bug Something isn't working label Sep 10, 2024
@neutrinoceros neutrinoceros changed the title BUG(?): crash in uv sync --no-build --no-install-project BUG: crash in uv sync --no-build --no-install-project Sep 10, 2024
charliermarsh added a commit that referenced this issue Sep 11, 2024
## Summary

We need to apply the `--no-install` filters earlier, such that we don't
error if we only have a source distribution for a given package when
`--no-build` is provided but that package is _omitted_.

Closes #7247.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants