bazel-skylib icon indicating copy to clipboard operation
bazel-skylib copied to clipboard

Common useful functions and rules for Bazel

Results 153 bazel-skylib issues
Sort by recently updated
recently updated
newest added

While studying the source code, I came across this line: https://github.com/bazelbuild/bazel-skylib/blob/872e9b06e18ae8ba2897cb65b9aaa172aa6279f3/gazelle/bzl/gazelle.go#L114 Later on, `imports` will be appended by as many as `len(srcs)` elements: https://github.com/bazelbuild/bazel-skylib/blob/872e9b06e18ae8ba2897cb65b9aaa172aa6279f3/gazelle/bzl/gazelle.go#L116-L126 At the end, `len(imports)` and `cap(imports)`...

This patch adds new helper macros for dealing with incompatible target skipping. Specifically, the macros help make the `target_compatible_with` more readable and easier to understand. Without these helpers you are...

I would like to run a precompiled binary that depends on precompiled `.so` libraries distributed together. I tried putting it in runfiles via `data` dependency using `filegroup(srcs = ["*.so"])` but...

type: feature request
P4

If we will remove new_sets, then we should deprecate it instead of sets.

TreeArtifacts have a lot of shortcomings. One of them is that it's impossible for an action to produce labels both for a directory output (`ctx.actions.declare_directory`) and *also* a label for...

type: feature request
P3

Test rules can return `testing.TestEnvironment` to include custom environment variables for when the test is run. This works, however, they are not visible in the action object that an analysis...

type: bug
P3

The `toolchains` attribute is hard-coded to just the skylib unit test toolchain type. See: https://github.com/bazelbuild/bazel-skylib/blob/a501641daebdce8601ee6bbc6b5d177c688d3517/lib/unittest.bzl#L286 Should it propagate the toolchains for testing them?

type: feature request
more data needed

I would like to write an analysis test for a rule that is intended to be used for build tool targets. I.e. targets that will be depended upon with `cfg...

type: feature request
P3

When testing for analysis-phase-failures in rules this rule provides otherwise necessary boilerplate that simply allows to test for correct Error messages I discovered this reoccuring rule while testing some of...

cla: yes

This changes the `out` attribute in native binary to default to the target name if unspecified, which is convenient because it can be omitted when renaming targets that are linux...