diff options
author | brandjon <brandjon@google.com> | 2018-04-12 10:45:24 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-12 10:46:46 -0700 |
commit | cbe428a8c84436ddf8964fc38918825d9d8c4cec (patch) | |
tree | 628a204307e8a2740a65046b06a53b8d437c1d23 /site/docs/skylark | |
parent | 510c10707af759a19fcb3e414fa036ed60f4bf1d (diff) |
Document the new ctx.actions.args() API
RELNOTES: Args objects (ctx.actions.args()) have new methods add_all() and add_joined() for building command lines using depsets.
RELNOTES[INC]: Added flag --incompatible_disallow_old_style_args_add to help migrate from args.add() to args.add_all() / args.add_joined() where appropriate.
PiperOrigin-RevId: 192633763
Diffstat (limited to 'site/docs/skylark')
-rw-r--r-- | site/docs/skylark/backward-compatibility.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/site/docs/skylark/backward-compatibility.md b/site/docs/skylark/backward-compatibility.md index 1bc3f86281..49c0b6f10f 100644 --- a/site/docs/skylark/backward-compatibility.md +++ b/site/docs/skylark/backward-compatibility.md @@ -36,6 +36,7 @@ guarded behind flags in the current release: * [Depset union](#depset-union) * [String is no longer iterable](#string-is-no-longer-iterable) * [New actions API](#new-actions-api) +* [New args API](#new-args-api) * [Glob tracking](#glob-tracking) @@ -171,6 +172,21 @@ replacements are as follows. * Default: `false` +### New args API + +The [Args](lib/Args.html) object returned by `ctx.actions.args()` has dedicated +methods for appending the contents of a list or depset to the command line. +Previously these use cases were lumped into its [`add()`](lib/Args.html#add) +method, resulting in a more cluttered API. + +With this flag, `add()` only works for scalar values, and its deprecated +parameters are disabled. To add many arguments at once you must use `add_all()` +or `add_joined()` instead. + +* Flag: `--incompatible_disallow_old_style_args_add` +* Default: `false` + + ### Glob tracking When set, glob tracking is disabled. This is a legacy feature that we expect has |