Skip to content

Commit 09b6722

Browse files
redsun82Copilot
andcommitted
Just: say that overriding a shared variable freezes it
A root assigns the whole value, so an exclusion added here later never reaches one, and `just` rejects an append as self-referential. This is the reverse of the rename already documented: the override keeps applying exactly as written, and the roots that miss the addition are the ones that cared enough to redirect the setting. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 241a421 commit 09b6722

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

misc/just/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,16 @@ overriding several loses only the renamed one, leaving a half-applied configurat
8181
total failure would land in a state someone designed, while partial failure lands in one
8282
nobody has ever seen.
8383

84-
Nothing can see it either, because the underscore that keeps these out of `just --list`
84+
An override also freezes what it replaces. A root assigns the whole value, so an
85+
exclusion or a name added here later never reaches one, and `just` offers no way to
86+
append: a root writing `_bazel_excluded := _bazel_excluded + ",mine"` is told the
87+
variable is defined in terms of itself. This runs the opposite way from a rename, where
88+
the override stops applying and the value here wins. Here the override keeps applying
89+
exactly as written, and the roots that never see the addition are the ones that cared
90+
enough about the setting to redirect it. Adding to one of these values is therefore a
91+
change to make on both sides at once.
92+
93+
Neither shows up anywhere, because the underscore that keeps these out of `just --list`
8594
keeps them out of `--variables` and a bare `--evaluate` as well. Asked by name they do
8695
answer, which is how a root checks that an override of its own still overrides anything:
8796

0 commit comments

Comments
 (0)