bazel-contrib / bazel-contrib/rules_uv
`pip_compile`: Prefer `uv export` over `uv pip compile` to respect default `[dependency-groups]`
- Dominant language
- Starlark
- Stars
- 29
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Given a `pyproject.toml` with [dependency-groups](https://docs.astral.sh/uv/concepts/projects/dependencies/#dependency-groups), eg
```
[dependency-groups]
group-a = [
"requests"
]
group-b = []
[tool.uv]
default-groups = ["group-a"]
```
* `uv export` respects the `default-groups` and produces a `requirements.in` containing `requests` and transitive dependencies
* `uv pip compile` on the other hand generates an empty file.
The `pip_compile` rule is using `uv pip compile` and hence misses the groups.
Contributor guide
Research direction
Start by locating the implementation of the `pip_compile` rule and compare its current `uv pip compile` invocation with the reported `uv export` behavior. Verify the example `pyproject.toml` and confirm that the completed change includes the default dependency group's packages and transitive dependencies in the generated requirements output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100