Closed phst closed 1 month ago
What does this block? What rule are you trying to create or migrate?
@comius FYI.
In this case I've been using the workaround for my Emacs Lisp rules (https://github.com/phst/rules_elisp/commit/66ad6e257e083323a49a14f55016c37346eb17fb). It doesn't really block anything, it would just be nice to officially support this in Starlark to bring Starlark-written rules on par with native ones.
We will remove --compile_one_dependency
from Bazel. Thus, we will not provide functionality for it in Starlark.
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post @bazelbuild/triage
in a comment here and we'll take a look. Thanks!
Description of the problem / feature request:
--compile_one_dependency
officially works only for built-in rules. Starlark rules can passattr.label_list(flags = ["DIRECT_COMPILE_TIME_INPUT"])
, but that is undocumented and doesn't work for single-label attributes (attr.label
doesn't have aflags
parameter). It would be great to giveattr.label
andattr.label_list
an officially-supported parameter likedirect_compile_time_input = True/False
.Feature requests: what underlying problem are you trying to solve with this feature?
I'm trying to write a Starlark rule that has rough feature parity with the builtin rules, including support for
--compile_one_dependency
.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Create a Starlark rule with an attribute like
"srcs": attr.label_list()
. Use that rule in some BUILD file. Try runningbazel build --compile_one_dependency source-file
. Bazel will print an error like "Couldn't find dependency on target …".What operating system are you running Bazel on?
GNU/Linux (but this is OS-independent).
What's the output of
bazel info release
?release 4.0.0
If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.N/A
What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?N/A
Have you found anything relevant by searching the web?
I searched through GitHub issues for this repository, but found nothing related. https://github.com/bazelbuild/bazel/blob/09c621e4cf5b968f4c6cdf905ab142d5961f9ddc/src/test/java/com/google/devtools/build/lib/pkgcache/CompileOneDependencyTransformerTest.java#L75 is an example that "documents" the current support.