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

https://github.com/bazelbuild/bazel-skylib/blob/505e1bc3aaae8375f857637f78bf6b3dd953862a/rules/private/write_file_private.bzl#L32 write_file uses a simple `newline.join(ctx.attr.content)`, which means the last line does not end with a new line character. POSIX requires non-empty text files to end with new line characters:...

# Summary `run_binary` generates files in the sandbox directory but cannot find them when trying to set the `outs` values. So it seems like we can't use `run_binary` as a...

This brings in the `purl` field that is increasingly used by other libraries. In the `bzlmod` world this is less important, but for folks using workspace-based builds, skylib tends to...

change default scope value to target based on most up-to-date [design](https://docs.google.com/document/d/1rUoaUwkyZ9xf0UWZnaXMbfqwkiEinDwXYoJXVX3T0Tk/edit?tab=t.0#heading=h.xhdgscnozrsb)

This ensures that unit and analysis tests can be executed on all platforms, regardless of the current target platform, even after https://github.com/bazelbuild/bazel/issues/25823.

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/4990#0199b7b3-6fa4-4291-ba20-3ed16cb8f693 Platform: MacOS, Ubuntu, Windows Logs: ``` (06:08:08) ERROR: /private/var/tmp/_bazel_buildkite/51b44c65fda161ce4476fd982a7edd38/external/protobuf+/src/google/protobuf/compiler/php/BUILD.bazel:24:11: Cannot compute config conditions (06:08:08) ERROR: /private/var/tmp/_bazel_buildkite/51b44c65fda161ce4476fd982a7edd38/external/protobuf+/src/google/protobuf/compiler/BUILD.bazel:220:21: Target '@@protobuf+//src/google/protobuf/compiler/php:php' contains an error and its package is in error and...

Currently if a binary `foo` internally executes binary `bar`, then `bar`'s runfiles tree may not be populated as `bar` can only be added as an `input` and not as part...

``` WARNING: .../BUILD.bazel:9:11: in _write_xfile rule @@: target '@@' depends on deprecated target '@@bazel_tools//src/conditions:host_windows_x64_constraint': No longer used by Bazel and will be removed in the future. Migrate to toolchains or...

When using `diff_test`, it can be hard to determine why two files differ if the difference is due to whitespace (e.g. `^M` at the end of lines). Would it be...