commit | 4f9ab59fed2146929cd085c7946651bd2126e709 | [log] [tgz] |
---|---|---|
author | Vadim Shtayura <vadimsh@chromium.org> | Fri Jan 11 19:34:51 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Jan 11 19:34:51 2019 |
tree | 1a1e69c66c224044e527497884c36ae800026137 | |
parent | aa7c87510bda051d0f4b8d52d1ad08308ae7105e [diff] |
[lucicfg] Make rule's arguments kwargs only and None by default. Using positional args leads to some very confusing error messages like: core.builder( name = 'b', bucket = 'ci', service_account = 'noop@example.com', ) Traceback (most recent call last): ... Error: function builder takes at least 3 positional arguments (3 given) Instead we now get: Traceback (most recent call last): ... Error: missing required field "recipe" Hopefully https://github.com/google/starlark-go/issues/61 will land someday and we'll be able to say def f(*, a=None, b=None) to force all arguments to be passed via keywords. R=tandrii@chromium.org, nodir@chromium.org BUG=833946 Change-Id: I96336bd6b849e55db0b0a2fa508786212c5652d6 Reviewed-on: https://chromium-review.googlesource.com/c/1406418 Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
LUCI Go code is meant to be worked on from an Chromium infra.git checkout, which enforces packages versions and Go toolchain version. First get fetch via depot_tools.git then run:
fetch infra cd infra/go eval `./env.py` cd src/go.chromium.org/luci
Contributing uses the same flow as Chromium contributions.