cmd/mbf: keep non-native entries alive
All checks were successful
Test / Create distribution (push) Successful in 1m15s
Test / Sandbox (push) Successful in 2m54s
Test / Hakurei (push) Successful in 3m57s
Test / ShareFS (push) Successful in 4m3s
Test / Sandbox (race detector) (push) Successful in 5m43s
Test / Hakurei (race detector) (push) Successful in 6m40s
Test / Flake checks (push) Successful in 1m16s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-06-02 16:06:04 +09:00
parent 9e824452bd
commit 83498b5a8a

View File

@@ -782,11 +782,20 @@ func main() {
"Remove identifiers not reachable by loaded packages", "Remove identifiers not reachable by loaded packages",
func([]string) error { func([]string) error {
return cm.Do(func(cache *pkg.Cache) error { return cm.Do(func(cache *pkg.Cache) error {
t := rosa.Native().Std() t := rosa.Native().Clone().Std()
a := t.Append(nil, t.CollectAll()...)
for arch := range pkg.Arch() {
if arch == runtime.GOARCH {
continue
}
t.DropCaches(arch, t.Flags())
a = t.Append(a, t.CollectAll()...)
}
ids, checksums, err := cache.Clean( ids, checksums, err := cache.Clean(
flagDry, flagDry,
!flagDeep, !flagDeep,
t.Append(nil, t.CollectAll()...)..., a...,
) )
log.Printf( log.Printf(
"destroyed %d identifier and %d checksum entries", "destroyed %d identifier and %d checksum entries",