commit | d6d65680977c72e711a3cedec6fab1b803a97bc8 | [log] [tgz] |
---|---|---|
author | Vadim Shtayura <vadimsh@chromium.org> | Mon Jan 28 20:41:49 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Jan 28 20:41:49 2019 |
tree | 442a3efe3bae4c8da52920f12e4b9bb21f94150d | |
parent | 44f7753f2843a1f09a000be226d80154122cc5f3 [diff] |
[lucicfg] Add 'exec' builtin. It is like 'load', except it doesn't import any symbols and used specifically for side-effects of executing the module. Useful for splitting large scripts into a bunch of smaller ones. Starlark's 'load' statement is inconvenient to use for this: * It always requires something to be imported, i.e. load("...") is invalid statement. Should be load("...", <something>). When executing for side effects there's often nothing to import. * Attempting to imitate go's "_" import with load("...", "_") fails, since Starlark refused to load symbols starting with '_'. * Attempting to use some other sentinel symbol fails, since Starlark insists on not repeating loaded symbol names, e.g. the following is forbidden: load("//mod1.star", "dummy") load("//mod2.star", "dummy") R=tandrii@chromium.org, nodir@chromium.org BUG=833946 Change-Id: I0acf68ca2391f67b4f0bbac5cc0951db3ca73a27 Reviewed-on: https://chromium-review.googlesource.com/c/1438721 Commit-Queue: Vadim Shtayura <vadimsh@chromium.org> Reviewed-by: Andrii Shyshkalov <tandrii@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.