Skip to content

Drop goimports exception#262

Merged
jupblb merged 1 commit into
mainfrom
michal/pr261-cleanup
May 20, 2026
Merged

Drop goimports exception#262
jupblb merged 1 commit into
mainfrom
michal/pr261-cleanup

Conversation

@jupblb
Copy link
Copy Markdown
Collaborator

@jupblb jupblb commented May 20, 2026

PR #261 added an exception in flake.nix for the pr261 repro because its import "sort" was unused and goimports would strip it (breaking the repro).

Add a legitimate sort.Slice reference alongside the bare var _ = sort. The legitimate use keeps goimports happy; the bare ident still tickles the original should never lookup PkgName ... assertion, so the test still fails without the visitor fix. The flake-level exception is no longer needed and is removed.

The pr261 repro previously needed a goimports exclusion in flake.nix
because it had an unused 'sort' import that goimports would strip. Add
a legitimate 'sort.Slice' reference so the import is used; the bare
PkgName reference still triggers the original panic (without the
visitor fix), and goimports leaves the file alone. The flake-level
exception is no longer needed.
@jupblb jupblb changed the title Drop pr261 goimports exception by keeping its import used Drop goimports exception May 20, 2026
@jupblb jupblb requested a review from trly May 20, 2026 12:16
@jupblb jupblb enabled auto-merge (squash) May 20, 2026 12:17
@jupblb jupblb merged commit 4260d36 into main May 20, 2026
14 checks passed
@jupblb jupblb deleted the michal/pr261-cleanup branch May 20, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants