From 17b64bb42c225433b01d9848c26aec3980d76f1d Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 11 Feb 2026 17:50:18 +0900 Subject: [PATCH] internal/pkg: skip resolved cure errors This significantly improves error resolution performance. Signed-off-by: Ophestra --- internal/pkg/pkg.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/pkg/pkg.go b/internal/pkg/pkg.go index 1f765c1..fdde9be 100644 --- a/internal/pkg/pkg.go +++ b/internal/pkg/pkg.go @@ -947,10 +947,10 @@ func (c *Cache) openFile(f FileArtifact) (r io.ReadCloser, err error) { } if c.msg.IsVerbose() { rn := reportName(f, c.Ident(f)) - c.msg.Verbosef("curing %s to memory...", rn) + c.msg.Verbosef("curing %s in memory...", rn) defer func() { if err == nil { - c.msg.Verbosef("cured %s to memory", rn) + c.msg.Verbosef("opened %s for reading", rn) } }() } @@ -1151,6 +1151,9 @@ type DependencyCureError []*CureError // unwrapM recursively expands underlying errors into a caller-supplied map. func (e *DependencyCureError) unwrapM(me map[unique.Handle[ID]]*CureError) { for _, err := range *e { + if _, ok := me[err.Ident]; ok { + continue + } if _e, ok := err.Err.(*DependencyCureError); ok { _e.unwrapM(me) continue