bazel-skylib
bazel-skylib copied to clipboard
Common useful functions and rules for Bazel
Context: https://github.com/bazelbuild/bazel/issues/18617; example: https://github.com/knik0/faad2/pull/162 Just asking if it is appropriate. If so, I'll prepare a PR. Reasoning: normally to translate "properties" into skylark variables we have to 1. add repository...
[The instructions](http://bazel_skylib_gazelle_plugin_workspace/) mention to call the following: ```python load("@bazel_skylib_gazelle_plugin//:setup.bzl", "bazel_skylib_gazelle_plugin_setup") bazel_skylib_gazelle_plugin_setup() ``` This caused an error for me as I already had those [same initialization calls](https://github.com/bazelbuild/bazel-skylib/blob/60abca8fa2f970d4899857a46cb0586338dbf7a1/gazelle/setup.bzl#L27-L32) in my WORKSPACE. I...
While reading the doc I found this missing comma to break my build command, so here is the small, but valuable (i guess), fix :)
The `run_binary` rule assumes that the output to be captured is written to file(s) by the binary either in implied or through `args` location(s). This does not completely replace the...
Example: WORKSPACE: ``` load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "bazel_skylib", sha256 = "b8a1527901774180afc798aeb28c4634bdccf19c4d98e7bdd1ce79d1fe9aaad7", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz", "https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz", ], ) load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() ``` BUILD: ``` load("@bazel_skylib//rules:run_binary.bzl", "run_binary") sh_binary( name =...
Incompatible flag `--incompatible_disable_starlark_host_transitions` will be enabled by default in the next major release (Bazel 7.0), thus breaking Bazel skylib. Please migrate to fix this and unblock the flip of this...
As of https://github.com/bazelbuild/bazel/issues/12932, using `selects.config_setting_group` produces unexpected results because of how it uses an underlying alias to surface the settings. For example if you have: ```bzl load("@bazel_skylib//lib:selects.bzl", "selects") config_setting( name...
I am wondering why the file unittest.bash isn't provided by skylib? Can we make this file publicly available as part of skylib package?
A tiny FR for `run_binary`: Support passing a custom mnemonic and progress message (from rule attributes) to the binary action to increase feature parity w.r.t. `genrule`.
I have a Starlark `lists` module with several functions that make working with `list` values a little eaiser. I am willing to contribute it to `bazel-skylib` as the functionality seems...