internal/rosa: reinitialise frame alongside cache
All checks were successful
Test / Create distribution (push) Successful in 1m4s
Test / Sandbox (push) Successful in 2m46s
Test / ShareFS (push) Successful in 3m43s
Test / Hakurei (push) Successful in 3m57s
Test / Sandbox (race detector) (push) Successful in 5m25s
Test / Hakurei (race detector) (push) Successful in 6m28s
Test / Flake checks (push) Successful in 1m24s
All checks were successful
Test / Create distribution (push) Successful in 1m4s
Test / Sandbox (push) Successful in 2m46s
Test / ShareFS (push) Successful in 3m43s
Test / Hakurei (push) Successful in 3m57s
Test / Sandbox (race detector) (push) Successful in 5m25s
Test / Hakurei (race detector) (push) Successful in 6m28s
Test / Flake checks (push) Successful in 1m24s
The cached frame can contain information made outdated by the DropCaches call. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -189,8 +189,6 @@ type S struct {
|
|||||||
|
|
||||||
// Target architecture.
|
// Target architecture.
|
||||||
arch string
|
arch string
|
||||||
// For matching arch-specific values.
|
|
||||||
identArch unique.Handle[azalea.Ident]
|
|
||||||
// For initialising arch.
|
// For initialising arch.
|
||||||
archOnce sync.Once
|
archOnce sync.Once
|
||||||
|
|
||||||
@@ -229,7 +227,6 @@ func (s *S) wantsArch() {
|
|||||||
s.archOnce.Do(func() {
|
s.archOnce.Do(func() {
|
||||||
if s.arch == "" {
|
if s.arch == "" {
|
||||||
s.arch = runtime.GOARCH
|
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.arch = targetArch
|
||||||
s.identArch = unique.Make(azalea.Ident(s.arch))
|
|
||||||
s.opts = flags
|
s.opts = flags
|
||||||
for i := range s.c {
|
for i := range s.c {
|
||||||
s.c[i].Clear()
|
s.c[i].Clear()
|
||||||
}
|
}
|
||||||
|
s.frameOnce = sync.Once{}
|
||||||
}
|
}
|
||||||
|
|
||||||
// get returns the named [Artifact].
|
// get returns the named [Artifact].
|
||||||
@@ -426,7 +423,8 @@ func (s *S) getFrame() azalea.Frame {
|
|||||||
return unique.Make(azalea.Ident(name))
|
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{
|
enumCompress := map[unique.Handle[azalea.Ident]]any{
|
||||||
k("uncompressed"): uint32(pkg.TarUncompressed),
|
k("uncompressed"): uint32(pkg.TarUncompressed),
|
||||||
@@ -627,7 +625,7 @@ func (s *S) getFrame() azalea.Frame {
|
|||||||
fallback = arg.V
|
fallback = arg.V
|
||||||
continue
|
continue
|
||||||
|
|
||||||
case s.identArch:
|
case identArch:
|
||||||
return arg.V, true, nil
|
return arg.V, true, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user