aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--internal/rosa/state.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/internal/rosa/state.go b/internal/rosa/state.go
index 5d3421f2..6142e4ac 100644
--- a/internal/rosa/state.go
+++ b/internal/rosa/state.go
@@ -189,8 +189,6 @@ type S struct {
// Target architecture.
arch string
- // For matching arch-specific values.
- identArch unique.Handle[azalea.Ident]
// For initialising arch.
archOnce sync.Once
@@ -229,7 +227,6 @@ func (s *S) wantsArch() {
s.archOnce.Do(func() {
if s.arch == "" {
s.arch = runtime.GOARCH
- s.identArch = unique.Make(azalea.Ident(s.arch))
}
})
}
@@ -248,11 +245,11 @@ func (s *S) DropCaches(targetArch string, flags int) {
}
s.arch = targetArch
- s.identArch = unique.Make(azalea.Ident(s.arch))
s.opts = flags
for i := range s.c {
s.c[i].Clear()
}
+ s.frameOnce = sync.Once{}
}
// get returns the named [Artifact].
@@ -426,7 +423,8 @@ func (s *S) getFrame() azalea.Frame {
return unique.Make(azalea.Ident(name))
}
- var identDefault = k("default")
+ identDefault := k("default")
+ identArch := unique.Make(azalea.Ident(s.arch))
enumCompress := map[unique.Handle[azalea.Ident]]any{
k("uncompressed"): uint32(pkg.TarUncompressed),
@@ -627,7 +625,7 @@ func (s *S) getFrame() azalea.Frame {
fallback = arg.V
continue
- case s.identArch:
+ case identArch:
return arg.V, true, nil
}
}