diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-02-11 17:50:18 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-02-11 17:50:18 +0900 |
| commit | 17b64bb42c225433b01d9848c26aec3980d76f1d (patch) | |
| tree | a937697dc9a5c146914949ef9605a4eb7fbefa85 | |
| parent | dbb89dfb0f15121009a927945b09bc309a3e3e41 (diff) | |
internal/pkg: skip resolved cure errors
This significantly improves error resolution performance.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | internal/pkg/pkg.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/pkg/pkg.go b/internal/pkg/pkg.go index 1f765c1a..fdde9bec 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 |
