aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/rosa.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-19 01:26:21 +0900
committerOphestra <cat@gensokyo.uk>2026-05-19 01:26:21 +0900
commit4d60fa5632246d5e1c355573dc0fd0e85ca3dcd3 (patch)
tree7cfd915a7fb6e568c6a0664843cba7f76eaa585f /internal/rosa/rosa.go
parent8807cbc7305e424725b2be8eed7ecd9234f7772e (diff)
internal/rosa: evaluate packages late
This also enables concurrent evaluation. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/rosa.go')
-rw-r--r--internal/rosa/rosa.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/rosa/rosa.go b/internal/rosa/rosa.go
index dde85e00..209b8942 100644
--- a/internal/rosa/rosa.go
+++ b/internal/rosa/rosa.go
@@ -614,11 +614,11 @@ var native S
// Native returns the global [S].
func Native() *S { return &native }
-// evalTime is the duration of the initial built-in evaluation.
-var evalTime time.Duration
+// parseTime is the duration of early parsing of built-in azalea expressions.
+var parseTime time.Duration
-// EvalTime returns the duration of the initial built-in evaluation.
-func EvalTime() time.Duration { return evalTime }
+// ParseTime returns the time taken by early parsing of built-in azalea expressions.
+func ParseTime() time.Duration { return parseTime }
// nativeB is the backing directory of built-in azalea-based [Artifact]
// implementations.
@@ -632,9 +632,9 @@ func init() {
panic(err)
}
t := time.Now()
- if err = native.EvaluateFS(sub); err != nil {
+ if err = native.RegisterFS(sub); err != nil {
println(err.Error())
os.Exit(1)
}
- evalTime = time.Since(t)
+ parseTime = time.Since(t)
}