internal/rosa/package: migrate python packages

This also migrates LLVM LIT via the newly implemented special case.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-19 18:15:04 +09:00
parent 3010a209b5
commit ff44060763
5 changed files with 643 additions and 563 deletions

View File

@@ -451,6 +451,30 @@ func (s *S) getFrame() azalea.Frame {
return
}},
k("split"): {F: func(
args azalea.FArgs,
) (v any, set bool, err error) {
var p, sep string
var n int64
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
k("s"): &p,
k("sep"): &sep,
k("n"): &n,
}); err != nil {
return
}
if n < 0 {
n = 0
} else if n == 0 {
n = -1
}
v = strings.SplitN(p, sep, int(n))
set = true
return
}},
// intenral/pkg built-ins
k("remoteTar"): {F: func(