internal/rosa: read-only access to built-ins

This removes potential footguns caused by mutable builtins without requiring unnecessary clones.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
cat
2026-08-25 14:00:42 +09:00
parent 7ee5d5368d
commit ac7abbbe3f
16 changed files with 123 additions and 94 deletions
+2 -2
View File
@@ -42,8 +42,8 @@ func WriteReport(msg message.Msg, w io.Writer, c *pkg.Cache) error {
zero [wordSize]byte
buf [len(pkg.ID{}) + wordSize]byte
)
t := native.Std()
for _, p := range native.Collect() {
t := builtin.Std()
for _, p := range builtin.Collect() {
meta, a := t.MustLoad(p)
if meta == nil {
return errors.New("artifact " + p.String() + " in inconsistent state")