From: Michael Pratt Date: Wed, 28 Feb 2024 20:25:40 +0000 (-0500) Subject: cmd/go: always include action mode in trace name X-Git-Tag: go1.23rc1~967 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c57b18b48f434c305679290ce05a42a46082c598;p=gostls13.git cmd/go: always include action mode in trace name For actions with no package, the title "Executing action" is extremely vague. Add the action mode so that there is some differentiation. Change-Id: If6dcf81c7cd1f19a9532e56dd9f88abd1182ea97 Reviewed-on: https://go-review.googlesource.com/c/go/+/567936 Reviewed-by: Michael Matloob Reviewed-by: Bryan Mills LUCI-TryBot-Result: Go LUCI --- diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go index 92aa0c1dc5..505186da08 100644 --- a/src/cmd/go/internal/work/exec.go +++ b/src/cmd/go/internal/work/exec.go @@ -139,10 +139,11 @@ func (b *Builder) Do(ctx context.Context, root *Action) { var err error if a.Actor != nil && (!a.Failed || a.IgnoreFail) { // TODO(matloob): Better action descriptions - desc := "Executing action " + desc := "Executing action (" + a.Mode if a.Package != nil { - desc += "(" + a.Mode + " " + a.Package.Desc() + ")" + desc += " " + a.Package.Desc() } + desc += ")" ctx, span := trace.StartSpan(ctx, desc) a.traceSpan = span for _, d := range a.Deps {