Skip to content

Support executable wrappers in uv_toolchain聽#4181

Description

@hartikainen

馃殌 feature request

Relevant Rules

uv_toolchain and lock.

Description

I want to use a custom uv wrapper with the lock rule. In my case, the wrapper would obtain credentials and set index authentication variables before calling the pinned uv binary.

There are a couple of issues right now. First, uv_toolchain rejects executable targets with multiple output files. Second, lock forwards the executable without preserving its runfiles, which limits wrappers that depend on runtime files or symlinks.

Describe the solution you'd like

Allow uv_toolchain to accept executable wrappers with multiple output files. Preserve their runfiles, including ordinary symlinks and root symlinks, in both lock build actions and .run targets.

Export the downloaded uv binary with public visibility so wrappers can declare it as a runtime dependency.

I'll open a PR for this in a bit.

Describe alternatives you've considered

Patching rules_python.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions