Commit graph

8 commits

Author SHA1 Message Date
Cole Faust
6309234411 Require scl files in ExecutionModeScl
Also remove json from scl file builtins, as it's not in bazel.

Bug: 309686282
Test: Presubmits
Change-Id: I6227c5dc14922b4682380254b4716b4ae38c47b9
2023-11-13 11:47:30 -08:00
Cole Faust
ccd26808af Prevent using symlinks to starlark files
Symlinks are frequently confusing / a source of bugs. They also don't
provide much utility over just loading the other file and re-exporting
its symbols, so recommend doing that instead.

Test: Presubmits
Change-Id: Ie3052ebc0add77f1746d6321fbdf7bc15df9819b
2023-11-09 14:32:55 -08:00
Cole Faust
5b8dda087d Only allow .scl files to load other .scl files
.scl files are starlark configuraiont language files, which is starlark
without any of the bazel buildin symbols.

This is to match bazel's behavior, and it doesn't make sense for
scl files to load bzl files.

We should change all the release config bzl files to scl, and then
also make it so that when using executionModeScl you can only load
scl files.

Test: go test
Change-Id: I196bcf3a4548118791ed1d47c2d37e46a1ef86c4
2023-11-07 11:27:41 -08:00
Cole Faust
386b3746ce Define release flags in starlark instead of make
So that we have a more restricted enviornment for this new configuration
axis that can also be imported into other tools more easily.

Test: Manually (this time also tested setting OUT_DIR outside of the tree)
Change-Id: I01d90e06e45cba756156af16f63e04f575877263
2023-06-09 13:10:05 -07:00
Cole Faust
c63ce1ab58 Allow importing starlark code in makefiles
Adds a new `$(call run-starlark,my/starlark/file.bzl)` function that
will run the starlark file and set all the variables in the
variables_to_export_to_make dictionary as make variables.

Fixes: 280685526
Test: m nothing repeatedly causes no ninja regeneration, but touching all_versions.bzl does. go test, ./out/rbcrun -mode=rbc ./build/make/tests/run.rbc
Change-Id: Ic72e18dd28dba8233ba2dfb658b5d03ccece1bfd
2023-05-09 15:12:58 -07:00
Cole Faust
a874f88cee Remove unneeded rbcrun features
- rblf_cli and rblf_env
- -c and -f

This is in preparation for making rbcrun able to function as a more
general purpose starlark interpreter.

Bug: 280685526
Test: go test, ./out/rbc ./build/make/tests/run.rbc, ./build/bazel/ci/rbc_dashboard.py --quick aosp_arm64
Change-Id: Ifff9ce7b4369422f39c5003bb85a168c78bde7cf
2023-05-05 11:52:02 -07:00
Cole Faust
62878a2cef Remove regex functionality from rbcrun
As a first step to making .rbc files compatible with bazel,
remove regex support since bazel doesn't have it.

Fixes: 227384703
Test: ./out/rbcrun ./build/make/tests/run.rbc
Change-Id: I8b946c20cc42897a47a5516a167732f4e16b6158
2022-03-30 12:00:15 -07:00
Sasha Smundak
24159db21e Roboleaf product configuration runner
The application rbcrun executes Starlark scripts that define Android product configurations.
See README.md for details.

Test: go test
Fixes: 180529448
Change-Id: I7d728b47d3f381b7052a0d7d51c9e698e5c2e316
2021-03-18 10:03:59 -07:00