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
This commit is contained in:
Cole Faust
2023-11-07 11:14:58 -08:00
parent 253bd067da
commit 5b8dda087d
7 changed files with 84 additions and 15 deletions

View File

@@ -0,0 +1,3 @@
load(":test_scl.scl", _foo = "foo")
foo = _foo

View File

@@ -0,0 +1,3 @@
load(":bzl_loads_scl.bzl", _foo = "foo")
foo = _foo

View File

@@ -0,0 +1,3 @@
load(":bzl_loads_scl.bzl", _foo = "foo")
foo = _foo

2
tools/rbcrun/testdata/test_scl.scl vendored Normal file
View File

@@ -0,0 +1,2 @@
foo = "bar"