Adds a new module `modules` with two helper functions for module
extensions:
* `use_all_repos` makes it easy to return an appropriate
`extension_metadata` from a module extension (if supported) to
indicate that all repositories generated by the extension should be
imported via `use_repo`.
* `as_extension` turns a WORKSPACE macro into a module extension that
uses `use_all_repos` to automate the generation of `use_repo` calls.
Google internal linters are flagging skylib 1.3.0 because the stardoc_with_diff_test
macro lack a copyright notice and does not use a `name` parameter.
See https://github.com/bazelbuild/bazel-federation/pull/127
In particular, this allows us to use a modern Stardoc release to fix generated md docs.
And we can remove internal_deps.bzl/internal_setup.bzl - it's unnecessary complexity
needed only for deprecated Federation setup.
This rule is an alternative for genrule(): it can
run a binary with the desired arguments,
environment, inputs, and outputs, as a single
build action, without shelling out to Bash.
Fixes https://github.com/bazelbuild/bazel-skylib/issues/149
native_binary() wraps a pre-built binary or script
in a *_binary rule interface. Rules like genrule
can tool-depend on it, and it can be executed with
"bazel run". This rule can also augment the binary
with runfiles.
native_test() is similar, but creates a testable
rule instead of a binary rule.
Fixes https://github.com/bazelbuild/bazel-skylib/issues/148
RELNOTES[NEW]: The new `native_binary()` and `native_test()` rules let you wrap a pre-built binary in a binary and test rule respectively.
This new test rule compares two files and passes
if the files match.
On Linux/macOS/non-Windows, the test compares
files using 'diff'.
On Windows, the test compares files using
'fc.exe'. This utility is available on all Windows
versions I tried (Windows 2008 Server, Windows
2016 Datacenter Core).
See https://github.com/bazelbuild/bazel/issues/5508
See https://github.com/bazelbuild/bazel/issues/4319
Move maprule() to a private directory, to
discourage use of it. I (@laszlocsomor) am
planning breaking changes to it.
Also move private files (rule implementations) to
a subdirectory "rules/private/", to clean up the
"rules/" directory.
This PR adds two new rules: write_file and
write_xfile.
Both rules solve a common problem: to write a text
file with user-defined contents.
The problem is routinely solved using a genrule.
That however requires Bash, since genrules execute
Bash commands. Requiring Bash is a problem on
Windows.
The new rules do not require any shell.
The only difference between the rules is that
write_xfile creates an executable file while
write_file doesn't.
See https://github.com/bazelbuild/bazel/issues/4319
This PR adds two new rules: copy_file and
copy_xfile.
Both rules solve a common problem: to copy one
file to another location. The problem is routinely
solved using a genrule. That however requires
Bash, since genrules execute Bash commands.
Requiring Bash is a problem on Windows.
The new rules do not require Bash on Windows (only
on other platforms).
The only difference between the rules is that
copy_xfile creates an executable file while
copy_file doesn't.
See https://github.com/bazelbuild/bazel/issues/4319