]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: always include action mode in trace name
authorMichael Pratt <mpratt@google.com>
Wed, 28 Feb 2024 20:25:40 +0000 (15:25 -0500)
committerMichael Pratt <mpratt@google.com>
Thu, 7 Mar 2024 21:49:37 +0000 (21:49 +0000)
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 <matloob@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/cmd/go/internal/work/exec.go

index 92aa0c1dc50583e82b376f6279969ef197a57952..505186da080184ff7f50d17f7f334343a63c6d2b 100644 (file)
@@ -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 {