Skip to content

chore(trunk): run lint on Go 1.27.3 with golangci-lint 2.15.0 - #9868

Open
matthewmcneely wants to merge 1 commit into
mainfrom
matthewmcneely/trunk-go-1.27.3
Open

matthewmcneely wants to merge 1 commit into
mainfrom
matthewmcneely/trunk-go-1.27.3

Conversation

@matthewmcneely

@matthewmcneely matthewmcneely commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR bumps trunk's Go runtime to go@1.27.3 and golangci-lint to 2.15.0, so trunk check can lint the module again.

#9864 moved go.mod to go 1.27.3, but trunk still pins go@1.27.0 and golangci-lint 2.13.1. CI switches to the 1.27.3 toolchain automatically, and 1.27.3 writes export data version 5. The x/tools v0.49.0 importer inside golangci-lint 2.13.1 only reads up to version 4:

could not import internal/cpu (... export data version 5 is greater than maximum supported version 4)

So package x fails to load, every promoted x.SafeMutex method reports as undefined, and trunk flags whichever of those land in a changed hunk. #9747 hit it first:

dgraph/cmd/zero/oracle.go:602:8  s.orc.RLock undefined (type *Oracle has no field or method RLock)  golangci-lint2/typecheck

#9864 itself passed because it changed no Go code. Any PR that touches Go files using SafeMutex (or anything else in x) will fail the same way until this lands.

golangci-lint 2.15.0 is built on x/tools v0.52.0 and reads the new export data. I reproduced the failure locally with 2.13.1, then ran 2.15.0 under Go 1.27.3 with the repo config: no new issues on #9747 under the default, integration and integration2 build tags.

Checklist

  • The PR title follows the
    Conventional Commits syntax, leading
    with fix:, feat:, chore:, ci:, etc.
  • Code compiles correctly and linting (via trunk) passes locally

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Chores
    • Updated the versions of the Go runtime and Go linting tools used in the project. These are internal tooling updates and do not introduce user-facing changes.

go.mod has required go 1.27.3 since #9864, but trunk still ran the go
1.27.0 runtime with golangci-lint 2.13.1. CI auto-switches to the 1.27.3
toolchain, which writes export data version 5, and the x/tools v0.49.0
importer inside golangci-lint 2.13.1 only reads up to version 4. Package x
then fails to load, so every promoted x.SafeMutex method reports as
undefined, and trunk flags whichever of those land in a changed hunk:

  s.orc.RLock undefined (type *Oracle has no field or method RLock)

golangci-lint 2.15.0 is built on x/tools v0.52.0 and reads the new export
data; locally it reports no new issues on #9747 under the default,
integration and integration2 build tags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matthewmcneely
matthewmcneely requested a review from a team as a code owner October 22, 2026 20:02
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b4636e39-9a52-4fd0-b141-3d01cd5d546e
📥 Commits

Reviewing files that changed from the base of the PR and between 7f7a7e3 and 06a608e.

📒 Files selected for processing: 1
  • .trunk/trunk.yaml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

The Trunk configuration updates the enabled Go runtime from 1.27.0 to 1.27.3 and golangci-lint2 from 2.13.1 to 2.15.0.

Changes: Toolchain versions

Layer / File(s) Summary
Update enabled tool versions
.trunk/trunk.yaml
The configured Go version changes from 1.27.0 to 1.27.3, and golangci-lint2 changes from 2.13.1 to 2.15.0.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Suggested reviewers: mlwelles

Merge Risk: ⚪ Minimal · up to 06a60

The configured Go and golangci-lint2 versions match the intended compatibility update and are ready to merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: updating the Go runtime and golangci-lint versions used by trunk.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant