internal/pkg: cure completion verbose messages
All checks were successful
Test / Create distribution (push) Successful in 47s
Test / Sandbox (push) Successful in 2m51s
Test / ShareFS (push) Successful in 4m50s
Test / Sandbox (race detector) (push) Successful in 5m16s
Test / Hpkg (push) Successful in 5m15s
Test / Hakurei (push) Successful in 5m46s
Test / Hakurei (race detector) (push) Successful in 7m40s
Test / Flake checks (push) Successful in 1m40s

This reports cure completions to the user.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-12 20:01:49 +09:00
parent 610572d0e6
commit 3ffc0613a7

View File

@@ -741,7 +741,9 @@ func (c *Cache) openFile(f File) (r io.ReadCloser, err error) {
return
}
if c.msg.IsVerbose() {
c.msg.Verbosef("curing %s to memory...", reportName(f))
rn := reportName(f)
c.msg.Verbosef("curing %s to memory...", rn)
defer c.msg.Verbosef("cured %s to memory", rn)
}
var data []byte
if data, err = f.Cure(c.ctx); err != nil {
@@ -935,7 +937,15 @@ func (c *Cache) Cure(a Artifact) (
}
if c.msg.IsVerbose() {
c.msg.Verbosef("curing %s...", reportNameIdent(a, id))
rn := reportNameIdent(a, id)
c.msg.Verbosef("curing %s...", rn)
defer func() {
if checksums != "" {
c.msg.Verbosef("cured %s checksum %s", rn, checksums)
} else {
c.msg.Verbosef("cured %s", rn)
}
}()
}
// cure File outside type switch to skip TContext initialisation