2
0
Fork 0
mirror of https://github.com/bazelbuild/bazel-skylib synced 2024-11-27 05:43:25 +00:00
bazel-skylib/rules
Fabian Meumertzheim a832b8d717
copy_file: Do not add non-executables to default_runfiles (#326)
copy_file currently includes the copied file in its runfiles even if it is not executable, which makes every rule depending on it have the file as a runfile (e.g. a `cc_library` depending on a copied header file via the hdrs attribute).

In an ideal world, according to https://docs.bazel.build/versions/main/skylark/rules.html#runfiles-features-to-avoid, `copy_file` would not need to specify any runfiles in the `DefaultInfo` it returns - specifying `files` should suffice. However, due to the existence of rules with legacy behavior, this would break compatibility (actually, already with `sh_test` in skylib's unit tests).

As a compromise that preserves compatibility with legacy rules but nevertheless cleans up the runfiles tree of depending rules, use the `data_runfiles` attribute of `DefaultInfo` if the copied file is not executable.
2022-05-16 17:27:25 -04:00
..
private copy_file: Do not add non-executables to default_runfiles (#326) 2022-05-16 17:27:25 -04:00
analysis_test.bzl Fix linter warnings with new buildifier version. (#349) 2022-02-10 14:50:56 -05:00
BUILD Properly shell-quote diff_test's failure_message in bash (and document the failure_message attribute) (#364) 2022-04-06 15:16:14 -04:00
build_test.bzl Use more portable #!/usr/bin/env bash shebang instead of hardcoded /bin/bash. (#329) 2021-10-25 09:12:41 -04:00
common_settings.bzl update links to bazel docs (#306) 2021-06-16 13:00:06 -04:00
copy_file.bzl maprule: hide it, not ready for public use. (#133) 2019-03-20 18:13:32 +01:00
diff_test.bzl Properly shell-quote diff_test's failure_message in bash (and document the failure_message attribute) (#364) 2022-04-06 15:16:14 -04:00
expand_template.bzl Remove unnecessary wrapper macro for expand_template rule (#365) 2022-04-06 15:21:13 -04:00
native_binary.bzl Build native_binary/test src in correct configuration (#341) 2022-04-05 17:09:55 -04:00
run_binary.bzl Switch run_binary to cfg = "exec" to fix buildifier failure (#367) 2022-04-29 13:44:59 -04:00
select_file.bzl Add license and copyright notice (#245) 2020-04-15 12:57:49 +02:00
write_file.bzl maprule: hide it, not ready for public use. (#133) 2019-03-20 18:13:32 +01:00