aboutsummaryrefslogtreecommitdiffhomepage
path: root/pkg/pkg.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/pkg.go')
-rw-r--r--pkg/pkg.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/pkg.go b/pkg/pkg.go
index 5d9d8d48..fbd8755f 100644
--- a/pkg/pkg.go
+++ b/pkg/pkg.go
@@ -1521,7 +1521,7 @@ func (c *Cache) openFile(
id := c.Ident(f)
if c.msg.IsVerbose() {
rn := reportName(f, id)
- c.msg.Verbosef("curing %s%s%s in memory...", c.sgrIdent, rn, c.sgrRes)
+ c.msg.Verbosef("opening %s%s%s...", c.sgrIdent, rn, c.sgrRes)
defer func() {
if err == nil {
c.msg.Verbosef("opened %s%s%s for reading", c.sgrIdent, rn, c.sgrRes)
@@ -2053,6 +2053,9 @@ func WhenceString(whence int) string {
}
}
+// isType returns whether v is of concrete type T.
+func isType[T any](v any) bool { _, ok := v.(T); return ok }
+
// cure implements Cure without acquiring a read lock on abortMu. cure must not
// be entered during Abort.
func (c *Cache) cure(a Artifact, curesExempt, rebuild bool) (
@@ -2170,7 +2173,7 @@ func (c *Cache) cure(a Artifact, curesExempt, rebuild bool) (
}
whence = WNew
- if c.msg.IsVerbose() {
+ if c.msg.IsVerbose() && !isType[*Collect](a) {
rn := reportName(a, id)
c.msg.Verbosef("curing %s%s%s...", c.sgrIdent, rn, c.sgrRes)
defer func() {
@@ -2504,7 +2507,7 @@ func (c *Cache) cure(a Artifact, curesExempt, rebuild bool) (
err = f.linkSubstitute(ids, substitutes)
}
if err != nil {
- if c.msg.IsVerbose() {
+ if c.msg.IsVerbose() && !IsCollected(err) {
c.msg.Verbosef(
"cure %s%s%s: %s%v%s",
c.sgrIdent, reportName(ca, id), c.sgrRes,