The Wire · Showcase
GOPLS FIXES WINDOWS CRLF OFFSET DRIFT, REVIEW REPO CATCHES UP ON FORMATTING
By RepoJournal · Filed · About Go
The Go tools team patched a subtle but pervasive bug where CRLF line endings in assembly files threw identifier offsets out of sync, breaking accurate source navigation on Windows.
gopls/internal/util/asm was advancing source offsets using stripped token lengths, causing identifier positions to drift left by one byte for every CRLF line [1]. The fix switches to raw line lengths from bytes.SplitSeq, keeping offsets accurate across platforms. In parallel, the review repo finally aligned its copyright headers with the convention change applied elsewhere in the ecosystem [2]. Two smaller fixes landed: the refactor/satisfy tool now handles invalid composite literal types without panicking [3], and gomobile switched to portable slash-separated asset paths instead of Windows backslashes in AAR and APK archives [4]. These are the kinds of quiet, cross-platform correctness improvements that prevent hours of debugging downstream.
One email a day. Unsubscribe in one click.
Keep up with Go in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Update gopls if you develop on Windows or parse assembly code golang/tools [plan]
- → Review your builds if you use gomobile on Windows with nested asset paths golang/mobile [monitor]
References
- [1] gopls/internal/util/asm: preserve offsets in CRLF files golang/tools
- [2] all: remove double space in copyright headers golang/review
- [3] refactor/satisfy: fix panic on invalid types golang/tools
- [4] cmd/gomobile: use slash-separated Android asset paths golang/mobile