Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

golangci-lint 1.45.0 #97241

Closed

Conversation

DasSkelett
Copy link
Contributor

@DasSkelett DasSkelett commented Mar 18, 2022

Created with brew bump-formula-pr.

This release has support for and requires Go 1.18 to build.
The previous release can already be built using Go 1.18, but fails when invoking some linters that are broken with Go 1.18. The new release fixes some of the linters and disables many other linters that fail.
See golangci/golangci-lint#2438 and golangci/golangci-lint#2649

This creates a bit of a bootstrapping problem for Brew, #91369 won't succeed until golangci-lint (amongst all the other failed packages) is fixed, and golangci-lint can't be fixed until Go 1.18 lands.
It might be necessary to create another PR pinning it to [email protected] in the meantime, or disable the tests.

Edit: Judging from the green CI and local testing, it looks like 1.45.0 can still be built using Go 1.17 despite the go directive in go.mod stating 1.18 as minimum version; it also appears to work fine as long as the linted code is <1.18.
So it should be fine merging this right away to remove another blocker for Go 1.18.

Test output from #91369 regarding golangci-lint
==> brew fetch --build-from-source --retry golangci-lint
==> brew install --build-from-source --only-dependencies golangci-lint
==> brew install --build-from-source golangci-lint
==> brew install --only-dependencies golangci-lint
==> brew linkage --test golangci-lint
==> brew install --only-dependencies --include-test golangci-lint
==> brew test --retry --verbose golangci-lint
==> brew uninstall --force golangci-lint
==> brew fetch --retry golangci-lint
==> brew install --only-dependencies golangci-lint
==> brew install golangci-lint
==> brew install --only-dependencies golangci-lint
==> brew linkage --test golangci-lint
==> brew linkage --cached --test --strict golangci-lint
==> brew install --only-dependencies --include-test golangci-lint
==> brew test --retry --verbose golangci-lint
==> FAILED
Full test golangci-lint output
  ==> Testing golangci-lint
  ==> /usr/local/Cellar/golangci-lint/1.44.2/bin/golangci-lint --version
  panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt
  
  goroutine 1 [running]:
  github.com/go-critic/go-critic/checkers.init.22()
  	github.com/go-critic/[email protected]/checkers/embedded_rules.go:46 +0x4b4
  
  ==> Testing golangci-lint (again)
  ==> /usr/local/Cellar/golangci-lint/1.44.2/bin/golangci-lint --version
  panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt
  
  goroutine 1 [running]:
  github.com/go-critic/go-critic/checkers.init.22()
  	github.com/go-critic/[email protected]/checkers/embedded_rules.go:46 +0x4b4
  
  Error: golangci-lint: failed
  An exception occurred within a child process:
    Minitest::Assertion: Expected: 0
    Actual: 2
  /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/minitest-5.15.0/lib/minitest/assertions.rb:183:in `assert'
  /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/minitest-5.15.0/lib/minitest/assertions.rb:218:in `assert_equal'
  /usr/local/Homebrew/Library/Homebrew/formula_assertions.rb:26:in `shell_output'
  /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/golangci-lint.rb:42:in `block in <class:GolangciLint>'
  /usr/local/Homebrew/Library/Homebrew/formula.rb:2112:in `block (3 levels) in run_test'
  /usr/local/Homebrew/Library/Homebrew/utils.rb:590:in `with_env'
  /usr/local/Homebrew/Library/Homebrew/formula.rb:2111:in `block (2 levels) in run_test'
  /usr/local/Homebrew/Library/Homebrew/formula.rb:948:in `with_logging'
  /usr/local/Homebrew/Library/Homebrew/formula.rb:2110:in `block in run_test'
  /usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `block in run'
  /usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `chdir'
  /usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `run'
  /usr/local/Homebrew/Library/Homebrew/formula.rb:2363:in `mktemp'
  /usr/local/Homebrew/Library/Homebrew/formula.rb:2104:in `run_test'
  /usr/local/Homebrew/Library/Homebrew/test.rb:43:in `block in <main>'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `block in catch'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `catch'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `catch'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:108:in `timeout'
  /usr/local/Homebrew/Library/Homebrew/test.rb:48:in `<main>'

@BrewTestBot BrewTestBot added bump-formula-pr PR was created using `brew bump-formula-pr` go Go use is a significant feature of the PR or issue labels Mar 18, 2022
@chenrui333
Copy link
Member

Thanks @DasSkelett for your efforts!

@BrewTestBot
Copy link
Member

🤖 A scheduled task has triggered a merge.

@DasSkelett DasSkelett deleted the bump-golangci-lint-1.45.0 branch March 19, 2022 00:12
@github-actions github-actions bot added the outdated PR was locked due to age label Apr 18, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` go Go use is a significant feature of the PR or issue outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants