internal/rosa/package: migrate bison

This is the final remaining trivial legacy artifact.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-21 23:06:34 +09:00
parent 5647321622
commit 68a91523b9
5 changed files with 86 additions and 97 deletions

View File

@@ -369,21 +369,6 @@ func (s *S) MustRegister(name string, f Artifact) {
}
}
// mustRegister registers an [Artifact] with the old function signature.
//
// Deprecated: Artifacts should be migrated to Register.
func (s *S) mustRegister(
f func(t Toolchain) (pkg.Artifact, string),
meta *Metadata,
) {
s.MustRegister(meta.Name, func(t Toolchain) (*Metadata, pkg.Artifact) {
v := *meta
a, version := f(t)
v.Version = version
return &v, a
})
}
// count returns the number of [Artifact] registered to s.
func (s *S) count() int {
return int(s.artifactCount.Load())
@@ -599,6 +584,20 @@ func (s *S) getFrame() azalea.Frame {
return
}},
k("skipGNUTests"): {F: func(
args azalea.FArgs,
) (v any, set bool, err error) {
var tests []int64
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
k("tests"): &tests,
}); err != nil {
return
}
v = skipGNUTests(tests...)
set = true
return
}},
// intenral/pkg built-ins
k("remoteTar"): {F: func(