internal/rosa: extra inputs in alternative path
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m49s
Test / ShareFS (push) Successful in 3m45s
Test / Hakurei (push) Successful in 3m51s
Test / Sandbox (race detector) (push) Successful in 5m29s
Test / Hakurei (race detector) (push) Successful in 6m34s
Test / Flake checks (push) Successful in 1m23s

This works around particularly unwieldy build systems.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-21 15:02:53 +09:00
parent 40b33f9fc7
commit 1acb5b0105
2 changed files with 17 additions and 2 deletions

View File

@@ -142,6 +142,8 @@ var (
IdentInputs = unique.Make(Ident("inputs"))
// IdentRuntime has the same semantics as [IdentInputs].
IdentRuntime = unique.Make(Ident("runtime"))
// IdentExtra has the same semantics as [IdentInputs].
IdentExtra = unique.Make(Ident("extra"))
// IdentSource is a special argument in a package declaration where an
// assignment of a [Val] with a single [Ident] passes through the evaluator.
IdentSource = unique.Make(Ident("source"))
@@ -291,6 +293,7 @@ func evaluateAny(d PF, s []Frame, expr, rp any) bool {
for _, special := range [...]unique.Handle[Ident]{
IdentInputs,
IdentRuntime,
IdentExtra,
} {
if slices.Contains(names, special) {
if len(names) != 1 || len(arg.V) != 1 || arg.R {