[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>
4 files changed
tree: 442a3efe3bae4c8da52920f12e4b9bb21f94150d
  1. appengine/
  2. auth/
  3. buildbucket/
  4. cipd/
  5. client/
  6. common/
  7. config/
  8. cq/
  9. dm/
  10. examples/
  11. gce/
  12. grpc/
  13. hardcoded/
  14. infra/
  15. logdog/
  16. luci_notify/
  17. lucicfg/
  18. lucictx/
  19. machine-db/
  20. milo/
  21. mmutex/
  22. mp/
  23. scheduler/
  24. scripts/
  25. server/
  26. starlark/
  27. swarming/
  28. tokenserver/
  29. tools/
  30. tumble/
  31. vpython/
  32. web/
  33. .gitattributes
  34. .travis.yml
  35. AUTHORS
  36. codereview.settings
  37. CONTRIBUTING.md
  38. CONTRIBUTORS
  39. LICENSE
  40. OWNERS
  41. pre-commit-go.yml
  42. PRESUBMIT.py
  43. README.md
README.md

luci-go: LUCI services and tools in Go

GoDoc

Installing

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

Contributing uses the same flow as Chromium contributions.