test/goroot: #2102 diagnostic normalization regresses five Go 1.26 errorcheck cases
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 74/100
Research direction
Start in the test/goroot errorcheck runner and reproduce the five fixedbugs cases with the provided Go 1.26 GOROOT command. Compare the current behavior with issue31053 and PR #2102; done means the original diagnostics match first, the normalized spelling remains a fallback, and all six cases pass.
Written by the indexing model from the issue text.
Description
Summary
PR #2102 added GOROOT-only go/types diagnostic normalization for its intended loader frontend cases. The normalization runs before ERROR matching and replaces the original diagnostic text unconditionally.
This regresses five unrelated Go 1.26 errorcheck cases whose raw LLGo diagnostics already match their upstream ERROR expressions:
- fixedbugs/issue17631.go
- fixedbugs/issue19482.go
- fixedbugs/issue22794.go
- fixedbugs/issue24339.go
- fixedbugs/issue25727.go
Evidence
A first-parent bisect using Go 1.26.5 identifies merge commit e6156d3c (PR #2102) as the first bad mainline commit. All five cases pass at its parent 4230b922 and fail at e6156d3c.
Running the current LLGo compiler directly, before the GOROOT runner normalizes output, produces diagnostics such as:
unknown field updates in struct literal of type ...
unknown field _ in struct literal of type T
i1.floats undefined (... but does have field Floats)
unknown field foo in struct literal of type struct{}
unknown field DoneChan in struct literal of type http.Server
These forms match the corresponding upstream ERROR expressions. The #2102 normalization changes them before matching, for example:
unknown field foo
-> unknown field 'foo'
but does have field Floats
-> but does have Floats
The runner then reports no match even though the original compiler diagnostic was acceptable.
The normalization remains necessary for the original #2102 cross-package case fixedbugs/issue31053.dir/main.go, whose ERROR expressions require the alternate quoted wording. Removing the normalization entirely would regress that case.
Reproduction
With a Go 1.26 GOROOT that includes GOROOT/test:
GOMAXPROCS=2 go test -p=1 ./test/goroot -count=1 -timeout=30m -args \
-goroot "$(go env GOROOT)" \
-directive-mode coverage \
-directives errorcheck \
-case '^fixedbugs/(issue17631|issue19482|issue22794|issue24339|issue25727)\.go$'
Expected behavior
Try the original diagnostic against the upstream ERROR expression first. Only use the #2102 normalized spelling as a fallback when the original text does not match.
This preserves issue31053 while restoring the five cases above.
Test gap
At the time #2102 merged, the GOROOT workflow used directive-mode ci, which covered run, runoutput, and buildrun but not errorcheck. The focused #2102 validation covered its five intended cases and did not include these five incidental regressions.
- Dominant language
- LLVM
- Stars
- 758
- Forks
- 49
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 138
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from xgo-dev/llgo
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
mlir
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
llvm/llvm-project#224908 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
area-CodeGen-coreclr untriaged
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
secondlife/sl-vscode-plugin#147 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
objectionary/phie#149 ·