bazel-skylib
bazel-skylib copied to clipboard
Common useful functions and rules for Bazel
This makes it hard to tell at a glance which targets had to get rebuilt in a given test invocation without examining the profile. I believe this happens because the...
Need to add trailing comma: ```skylark sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94", ```
Fixes: #399
Hi, We find ourselves duplicating a lot of code for no benefit when using `native_binary`: ``` native_binary( name = "foo", src = "path/to/foo", out = "path/to/foo", ) ``` Would it...
When running the bzl_library Gazelle plugin over https://github.com/kythe/kythe/blob/master/tools/build_rules/verifier_test/BUILD it ends up modifying that file to just delete the `srcs` attribute from the respective `bzl_library` targets and it's not obvious to...
See https://github.com/bazel-contrib/publish-to-bcr/issues/46; publish-to-bcr now supports a multi-repo setup.
`select_file` rule currently only searches within `DefaultInfo.files`. I was wondering if we can add an argument to `select_file` to optionally expand the search criteria to include `DefaultInfo.default_runfiles` It would look...
Improve getting actions from the target under test: 1. Add an keyword "mnemonic" parameter to `analysistest.target_actions()` to filter actions by mnemonic. 2. Add `analysistest.target_action(env, mnemonic=None, output_ending_with=None)` to get a single...
If a user wants make variable substitution, they need to either write their own versions of these rules or else fall back to genrule. I assume a boolean attribute would...
Right now `run_binary` only supports `$(location …)`, cf. https://github.com/bazelbuild/bazel-skylib/blob/5bfcb1a684550626ce138fe0fe8f5f702b3764c3/rules/run_binary.bzl#L37. It should also support `$(execpath …)` and possible (if it makes sense) `$(rootpath …)` and `$(rlocationpath …)`. (Same with the pluralized...