(no title)
malkia | 3 months ago
Python "deals" with it
All three options though are full blown Turing-complete languages - e.g. they can loop forever. You don't want that in CI, or a build system.
Starlark is concurrency safe. Top-level global values, once initialized, are frozen (read-only), hence they can be safely accessed by multiple threads. There are no "global" effects (AFAIK), apart from actually doing I/O by calling actions (processes, etc.)
Blaze (bazel's parent) used Python, and had these non-hermetic issues, because you can do anything with Python (actually "Lua" might be easier to sandbox, but maybe python too - not sure).
Point is, starlark is well suited for this job. It wasn't - "Hey let's design this new language". It's really Python but with limited powers for a reason, to enable other unlimited powers (concurrency, avoid recursion, etc).
No comments yet.