Skip to content

shell toolchain, design: including common bintools #5265

@laszlocsomor

Description

@laszlocsomor

Description of the problem / feature request:

Design a mechanism to express that a rule executing a shell command depends on certain command line tools.

Feature requests: what underlying problem are you trying to solve with this feature?

Not every machine has Bash installed, and those that do don't always install Bash at the same location, or have another shell interpreter installed. To accommodate all scenarios, I designed how to turn Bash, or broadly speaking, the Shell, into a toolchain. The efforts is tracked as #4319.

However what Bazel treats as "the shell" is more than just the shell interpreter. Bazel assumes that not only Bash is the shell and it's installed at a fixed location, but also that common GNU binutils and other common programs such as "zip" or "grep" are also installed and are on the PATH.

Rules that execute shell commands also expect these tools to exist and be on the PATH. Bazel currently has no way to express that such rules depend on these tools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)area-WindowsWindows-specific issues and feature requestscategory: misc > miscteam-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: feature requesttype: process

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions