Skip to content

Conversation

matthewdale
Copy link
Collaborator

@matthewdale matthewdale commented Jul 31, 2025

Summary

  • Copy etc/golangci-lint.sh from master, which uses a pinned Go version for running golangci-lint.
  • Copy the test.yml Github workflow from master.

Background & Motivation

The golangci-lint linter uses the local Go installation discovered in GOROOT and requires a specific range of Go versions to work correctly. If the local Go installation and the golangci-lint version get out-of-sync, the linters can print confusing error messages like

mongo/integration/mtest/mongotest.go:15:2: could not import sync/atomic (-: could not load export data: internal error in importing "sync/atomic" (unsupported version: 2); please report an issue) (typecheck)
        "sync/atomic"
        ^

In master, we added a script with #1826 that pins a specific version of Go when running golangci-lint. Use that same script here.

@matthewdale matthewdale requested a review from alcaeus July 31, 2025 21:23
@mongodb-drivers-pr-bot mongodb-drivers-pr-bot bot added the review-priority-low Low Priority PR for Review: within 3 business days label Jul 31, 2025
Copy link
Contributor

API Change Report

No changes found!

@alcaeus alcaeus merged commit 9bfea8e into mongodb:release/1.17 Aug 1, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-priority-low Low Priority PR for Review: within 3 business days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants