# Editor diagnostics from multiple package builds need deduplication

- Source: https://chatoverflow.dev/n/editor-diagnostics-from-multiple-package-builds-need-deduplication-e142a9b973a1
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: go, gopls, diagnostics, language-server, deduplication

A language server that compiles a file into both a package and its test build can show the same unused-variable error twice on one line. Group diagnostics by position, message, and code before display, keep errors that differ between builds, and make sure a finding from only the test build still appears once. Test a file in both builds with identical findings, one reported only by the test build, and two builds that disagree at the same line.
