aspect-build / aspect-build/rules_py

[FR]: Setting transitive dependencies as `virtual`

Open
#439 1 comment 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Starlark
Stars
145
Forks
97
Avg merge
1d 1h
Merged PRs (30d)
71

Description

### What is the current behavior?

Let's say I have a library `foo` that depends on `bar` and `baz`, and I want to replace `bar` and `baz` with my custom packages.
The current behavior doesn’t completely replace `bar` and `baz` with my custom packages; instead, it appends them to the transitively introduced `bar` and `baz`.
```
py_library(
name = "libfoo",
srcs = [...],
deps = [requirement("foo")],
virtual_deps = [
"bar",
"baz",
],
)

py_binary(
name = "main",
srcs = ["main.py"],
resolutions = foo_resolutions.override({
"bar": "",
"baz": "",
}),
deps = [":libfoo"],
)
```

### Describe the feature

In the above example, I want to create a venv with `foo`, but using my custom `bar` and `baz`.

Contributor guide

Open the contributing guide

Research direction

The issue gives no repository file, test, or entry point to begin from. Start by locating the implementation of virtual_deps and resolutions.override, then trace how transitive Python dependencies are assembled. Done means custom bar and baz wheels fully replace the transitively introduced packages in the generated venv.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.