Many rule have string argument when they should be label #10617
Labels
P3
We're not considering working on this, but happy to review a PR. (No assignee)
stale
Issues or PRs that are stale (no activity for 30 days)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: feature request
Description of the problem / feature request:
Many rules have
stringargument for things which, from my point of view, must belabel.For example,
http_archivecontains apatch_toolargument, which is astringand can be filled with the path to apatchbinary. However, I'm building mypatchbinary using an external bazel repository, so I don't know beforehand the path for mypatchbinary. Ifpatch_toolwas accepting alabel, I may just set it to@mypatch//:bin/patchfor example.I already opened a bug report for some specific rules here: #8438, but this bug report tries to be more general.
Feature requests: what underlying problem are you trying to solve with this feature?
I'm trying to have a fully reproducible build environment which does not depend on anything on the user system. To do that, I'm building / fetching everything in bazel, from simple tools such as
patchto complex things such as CC toolchain. Unfortunately, a lot of rule in bazel expectstringwith the (absolute) path to utilities on the system, so that's technically non possible.My current solution is to break a few bazel assumption and force my external repository rules to produce output in directories that I manage. Hence, I know beforehand the static path of my utilities.
The solution I'd like either:
labeleverywherestringare allowed, and simply replace them by the path to thelabel$(location)(or similar invocation) instringargument for most rules.What operating system are you running Bazel on?
Linux, macos and windows.
What's the output of
bazel info release?All bazel version are impacted.
Have you found anything relevant by searching the web?
no
Any other information, logs, or outputs that you want to share?
The text was updated successfully, but these errors were encountered: