Skip to content

[FR]: Setting transitive dependencies as virtual #439

Open
@bd-jahn

Description

@bd-jahn

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": "<path_to_bar_wheel>",
        "baz": "<path_to_baz_wheel>",
    }),
    deps = [":libfoo"],
)

Describe the feature

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions