Commit Graph

10 Commits

Author SHA1 Message Date
Chris Parsons 0373718c3e Merge branch 'master' into docs-overhaul 2019-02-27 17:20:26 -05:00
Chris Parsons 2138afe9dc appropriately escape build_test code snippet 2019-02-27 17:14:06 -05:00
c-parsons a2ec47917b
fix a number of warnings found by Starlark analyzer (#114) 2019-02-22 17:44:48 -05:00
Christopher Parsons 8e2272129c add documentation pages for rules/ and lib/ 2019-02-22 15:29:00 -05:00
c-parsons baaef76aaa
Add analysis_test rule
Targets of this rule verify that targets can be analyzed successfully.
This is similar to build_test, except no actual action execution of
the underlying targets occur. analysis_test essentially verifies that
`bazel build [targets] --nobuild` passes.
2019-02-19 15:16:36 -05:00
Thomas Van Lenten 4b67f5ff38 Add rules to the test_deps target. (#102)
* Add rules to the test_deps target.

Likely needed for anyone doing integration tests using skylib.

* Default public visibility and only tag things that are private.
2019-01-28 13:51:57 -05:00
Thomas Van Lenten 97dc99e8a6 Fix example load directive. (#101) 2019-01-28 11:37:57 -05:00
Thomas Van Lenten d3d5ba7d05 Some doc fixes (#100)
* fix up Args doc block.

* add a module doc string
2019-01-25 14:51:01 -05:00
Thomas Van Lenten f5e50bc53c Add a build_test rule. (#97)
* Add a build_test rule.

This rules (marco) provides a 'test' target that can be used to ensure other
targets build.
2019-01-25 14:34:15 -05:00
László Csomor 8d4f7612b2
maprule: an improved version of genrule() (#86)
maprule() is an improved version of
native.genrule(), with the following advantages:

- Maprule can process source files in parallel,
  creating separate actions for each of them.

- Maprule does not require declaring all output
  files. Instead you declare templates for the
  output files yielded for each source. Therefore
  N source files and M templates yield N*M
  outputs.

- Maprule supports both Bash and cmd.exe syntax
  for its commands via the specialized rules
  bash_maprule and cmd_maprule.

- Maprule's cmd attribute does deliberately not
  support $(location) expression nor Make
  Variables, in order to avoid issues and
  challenges with quoting. (In case of cmd.exe
  passing empty arguments is impossible). These
  paths can be passed as envvars instead.

- Maprule's add_env attribute does support
  $(location) expressions (and some extra
  placeholders) and is the idiomatic way to pass
  execpaths of labels in "tools" or "srcs" (the
  shared sources available for all actions) to the
  command.

See https://github.com/bazelbuild/bazel/issues/4319
2019-01-08 09:04:53 +01:00