internal/rosa: lazy initialise all artifacts
Some checks failed
Test / Create distribution (push) Failing after 43s
Test / ShareFS (push) Failing after 49s
Test / Sandbox (push) Failing after 1m5s
Test / Sandbox (race detector) (push) Failing after 1m5s
Test / Hakurei (push) Failing after 1m18s
Test / Hakurei (race detector) (push) Failing after 1m28s
Test / Hpkg (push) Failing after 1m29s
Test / Flake checks (push) Has been skipped

This improves performance, though not as drastically as lazy initialising llvm.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-25 01:32:21 +09:00
parent 43b8a40fc0
commit c44f9acc35
16 changed files with 138 additions and 86 deletions

View File

@@ -10,7 +10,7 @@ import (
func (t Toolchain) newGoBootstrap() pkg.Artifact {
const checksum = "8o9JL_ToiQKadCTb04nvBDkp8O1xiWOolAxVEqaTGodieNe4lOFEjlOxN3bwwe23"
return t.New("go1.4-bootstrap", []pkg.Artifact{
t.NewBash(),
t.Load(Bash),
}, nil, []string{
"CGO_ENABLED=0",
}, `
@@ -65,8 +65,7 @@ sh make.bash
)))
}
// NewGo returns a [pkg.Artifact] containing the Go toolchain.
func (t Toolchain) NewGo() pkg.Artifact {
func (t Toolchain) newGoLatest() pkg.Artifact {
go119 := t.newGo(
"1.19",
"9_e0aFHsIkVxWVGsp9T2RvvjOc3p4n9o9S8tkNe9Cvgzk_zI2FhRQB7ioQkeAAro",
@@ -90,3 +89,4 @@ func (t Toolchain) NewGo() pkg.Artifact {
)
return go125
}
func init() { artifactsF[Go] = Toolchain.newGoLatest }