-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit 8fcd92f
committed
gopls/internal/telemetry/cmd/stacks: predicate de-duplication
This CL introduces an expression language for matching
stacks, inspired by watchflakes. Each issue has a block
at the start of its body of this form:
```
#!stacks
"bug.Reportf" && "golang.Hover:+19"
```
where the expression is a sentence of this grammar:
expr = "string literal"
| ( expr )
| expr && expr
| expr || expr
| ! expr
A string literal implies a substring match against
a stack trace; the other forms are boolean operations.
The stacks command reads all such predicates at start,
and uses them to associate new stacks with existing
issues. (It reports an error if a stack is claimed by
two issues.) For each claim, it updates the issue
by adding a comment describing all the new stacks
(example: golang/go#60890 (comment))
and it adds/updates the "Dups: " list on the last
line of the issue body (first comment).
This should greatly reduce the amount of toil in
associating stacks with issues, since we can just
tweak the predicates to accommodate minor variations.
The GitHub auth token now needs R/W access to golang/go issues.
Fixes golang/go#65963
Change-Id: I836cd89bba456826839a389271ac38745e493a54
Reviewed-on: https://go-review.googlesource.com/c/tools/+/613215
Reviewed-by: Robert Findley <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>1 parent 7891473 commit 8fcd92fCopy full SHA for 8fcd92f
File tree
Expand file treeCollapse file tree
1 file changed
+398
-64
lines changedFilter options
- gopls/internal/telemetry/cmd/stacks
Expand file treeCollapse file tree
1 file changed
+398
-64
lines changed
0 commit comments