internal/rosa: lazy initialise all artifacts
All checks were successful
Test / Create distribution (push) Successful in 48s
Test / Sandbox (push) Successful in 2m37s
Test / Hakurei (push) Successful in 4m5s
Test / ShareFS (push) Successful in 4m2s
Test / Hpkg (push) Successful in 4m33s
Test / Sandbox (race detector) (push) Successful in 4m59s
Test / Hakurei (race detector) (push) Successful in 5m57s
Test / Flake checks (push) Successful in 1m44s

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 20790af71e
17 changed files with 174 additions and 94 deletions

View File

@@ -2,14 +2,13 @@ package rosa
import "hakurei.app/internal/pkg"
// NewPerl returns a [pkg.Artifact] containing an installation of perl.
func (t Toolchain) NewPerl() pkg.Artifact {
func (t Toolchain) newPerl() pkg.Artifact {
const (
version = "5.42.0"
checksum = "2KR7Jbpk-ZVn1a30LQRwbgUvg2AXlPQZfzrqCr31qD5-yEsTwVQ_W76eZH-EdxM9"
)
return t.New("perl-"+version, []pkg.Artifact{
t.NewMake(),
t.Load(Make),
}, nil, nil, `
chmod -R +w /usr/src/perl && cd /usr/src/perl
@@ -32,3 +31,4 @@ make DESTDIR=/work install
pkg.TarGzip,
)))
}
func init() { artifactsF[Perl] = Toolchain.newPerl }