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

go-critic/go-ruleguard: issues running under 1.20 #3586

Closed
4 tasks done
mpldr opened this issue Feb 11, 2023 · 11 comments · Fixed by #3616 or #3618
Closed
4 tasks done

go-critic/go-ruleguard: issues running under 1.20 #3586

mpldr opened this issue Feb 11, 2023 · 11 comments · Fixed by #3616 or #3618
Labels
bug Something isn't working dependencies Relates to an upstream dependency

Comments

@mpldr
Copy link

mpldr commented Feb 11, 2023

Welcome

  • Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc.).
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.). (https://golangci-lint.run/usage/linters/)

Description of the problem

Since Go 1.20 has been released our CI-Pipelines have been failing.

Before updating golangci-lint: https://builds.sr.ht/~rjarry/job/938148#bottom
After updating golangci-lint: https://builds.sr.ht/~rjarry/job/938728#bottom

Version of golangci-lint

before updating
$ go run github.com/golangci/golangci-lint/cmd/golangci-lint --version
golangci-lint has version v1.49.0 built from (unknown, mod sum: "h1:I8WHOavragDttlLHtSraHn/h39C+R60bEQ5NoGcHQr8=") on (unknown)
after updating
$ go run github.com/golangci/golangci-lint/cmd/golangci-lint --version
# github.com/quasilyte/go-ruleguard/ruleguard
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:26:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:102:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:118:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:134:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:150:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:166:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:215:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:325:51: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:339:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:354:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:354:50: too many errors

Configuration file

[run]
# include notmuch codes
build-tags = ["notmuch"]
# don't lint tests
tests = false

# enable additional linters
[linters]
enable = [
	"nolintlint", # nolint comments require justification
	"errorlint", # check to ensure no problems with wrapped errors
	"gocritic", # check for bugs, performance, and style issues
	"gofmt", # check that gofmt is satisfied
	"aerc", # aerc specific linters
]

[linters-settings.nolintlint]
allow-unused = false # don't allow nolint if not required
require-explanation = true # require an explanation when disabling a linter
requre-specific = true # linter exceptions must specify the linter

[linters-settings.custom.aerc]
path = "./linters.so"
description = "Aerc specific linters"
original-url = "git.sr.ht/~rjarry/aerc/contrib"

I could confirm that it is not our custom linter by simply commenting it out.

Go environment

$ go version && go env
go version go1.20 linux/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/moritz/.cache/go-build"
GOENV="/home/moritz/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS="-buildmode=exe"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/moritz/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/moritz/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/lib/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/moritz/Projects/aerc/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1460030550=/tmp/go-build -gno-record-gcc-switches"

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v
INFO [config_reader] Config search paths: [./ /home/moritz/Projects/aerc /home/moritz/Projects /home/moritz /home /] 
INFO [config_reader] Used config file .golangci.toml 
INFO Loaded ./linters.so: aerc                    
INFO [lintersdb] Active 12 linters: [aerc errcheck errorlint gocritic gofmt gosimple govet ineffassign nolintlint staticcheck typecheck unused] 
INFO [loader] Using build tags: [notmuch]         
INFO [loader] Go packages loading at mode 575 (name|types_sizes|exports_file|imports|files|compiled_files|deps) took 4.030049273s 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 27.016957ms 
INFO [linters context/goanalysis] analyzers took 19.418302818s with top 10 stages: buildir: 9.787908911s, inspect: 774.095103ms, gocritic: 726.029768ms, printf: 453.533038ms, S1038: 432.540959ms, ctrlflow: 391.58769ms, SA5012: 387.209183ms, fact_deprecated: 387.191565ms, fact_purity: 381.178701ms, typedness: 377.225837ms 
ERRO [runner] Panic: buildir: package "netip" (isInitialPkg: false, needAnalyzeSource: true): in net/netip.AddrFromSlice: cannot convert Load <[]byte> t0 ([]byte) to [4]byte: goroutine 4313 [running]:
runtime/debug.Stack()
	/usr/lib/go/src/runtime/debug/stack.go:24 +0x65
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1()
	/home/moritz/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:101 +0x155
panic({0x14da180, 0xc003790240})
	/usr/lib/go/src/runtime/panic.go:884 +0x213
honnef.co/go/tools/go/ir.emitConv(0xc004553540, {0x190e788, 0xc004619800}, {0x1901d40?, 0xc00089a7b0}, {0x1901430, 0xc00378a580})
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/emit.go:293 +0xd29
honnef.co/go/tools/go/ir.(*builder).expr0(0xc010855a28, 0xc004553540, {0x19050d0?, 0xc00378a580?}, {0x7, {0x1901d40, 0xc00089a7b0}, {0x0, 0x0}})
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:610 +0x5d7
honnef.co/go/tools/go/ir.(*builder).expr(0x1901ed0?, 0xc004553540, {0x19050d0, 0xc00378a580})
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:566 +0x1fa
honnef.co/go/tools/go/ir.(*builder).emitCallArgs(0x1901ed0?, 0xc004553540, 0xc00b56d5c0, 0xc00378a5c0, {0x0?, 0x0, 0x8b00a7?})
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:975 +0x135
honnef.co/go/tools/go/ir.(*builder).setCall(0x1543440?, 0xc004553540, 0xc00378a5c0, 0xc005b00e08)
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:1037 +0x8e
honnef.co/go/tools/go/ir.(*builder).expr0(0xc010855a28, 0xc004553540, {0x19050d0?, 0xc00378a5c0?}, {0x7, {0x1901e30, 0xc005166230}, {0x0, 0x0}})
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:623 +0x218e
honnef.co/go/tools/go/ir.(*builder).expr(0xc010854e78?, 0xc004553540, {0x19050d0, 0xc00378a5c0})
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:566 +0x1fa
honnef.co/go/tools/go/ir.(*builder).stmt(0xc004553540?, 0xc004553540, {0x1905610?, 0xc011128520?})
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:2291 +0x194c
honnef.co/go/tools/go/ir.(*builder).stmtList(...)
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:855
honnef.co/go/tools/go/ir.(*builder).switchStmt(0xc010855308?, 0xc004553540, 0xc0022d9650, 0x0)
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:1366 +0x19a5
honnef.co/go/tools/go/ir.(*builder).stmt(0x20?, 0xc004553540, {0x1905760?, 0xc0022d9650?})
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:2365 +0x121c
honnef.co/go/tools/go/ir.(*builder).stmtList(0x8b6a25?, 0xc0108554f8?, {0xc011128700?, 0x2, 0x8b8630?})
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:855 +0x45
honnef.co/go/tools/go/ir.(*builder).stmt(0xc004553540?, 0xc004553540, {0x1905070?, 0xc0022d9680?})
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:2338 +0x9b9
honnef.co/go/tools/go/ir.(*builder).buildFunction(0xc010855a28, 0xc004553540)
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:2450 +0x3d7
honnef.co/go/tools/go/ir.(*builder).buildFuncDecl(0x0?, 0xc00ab0f4d0, 0xc0022d9950)
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:2488 +0x19b
honnef.co/go/tools/go/ir.(*Package).build(0xc00ab0f4d0)
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:2594 +0xc16
sync.(*Once).doSlow(0xc004dcbce0?, 0xc003c10780?)
	/usr/lib/go/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
	/usr/lib/go/src/sync/once.go:65
honnef.co/go/tools/go/ir.(*Package).Build(...)
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:2512
honnef.co/go/tools/internal/passes/buildir.run(0xc0038df520)
	/home/moritz/go/pkg/mod/honnef.co/go/[email protected]/internal/passes/buildir/buildir.go:86 +0x368
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0xc0032805e0)
	/home/moritz/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:187 +0x9d6
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
	/home/moritz/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:105 +0x1d
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc001d14730, {0x16a31cb, 0x7}, 0xc0022e4748)
	/home/moritz/go/pkg/mod/github.com/golangci/[email protected]/pkg/timeutils/stopwatch.go:111 +0x4a
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0xc00290fda0?)
	/home/moritz/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:104 +0x85
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0xc0032805e0)
	/home/moritz/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_loadingpackage.go:80 +0xb4
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze
	/home/moritz/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_loadingpackage.go:75 +0x1eb 
WARN [runner] Can't run linter goanalysis_metalinter: goanalysis_metalinter: buildir: package "netip" (isInitialPkg: false, needAnalyzeSource: true): in net/netip.AddrFromSlice: cannot convert Load <[]byte> t0 ([]byte) to [4]byte 
INFO [runner] processing took 3.068µs with stages: max_same_issues: 471ns, nolint: 301ns, skip_dirs: 280ns, cgo: 271ns, max_from_linter: 190ns, exclude-rules: 181ns, source_code: 181ns, identifier_marker: 120ns, max_per_file_from_linter: 120ns, skip_files: 120ns, exclude: 111ns, uniq_by_line: 111ns, filename_unadjuster: 111ns, severity-rules: 110ns, autogenerated_exclude: 110ns, path_prettifier: 110ns, diff: 50ns, sort_results: 40ns, path_prefixer: 40ns, path_shortener: 40ns 
INFO [runner] linters took 3.203039529s with stages: goanalysis_metalinter: 3.203001186s 
ERRO Running error: 1 error occurred:
	* can't run linter goanalysis_metalinter: goanalysis_metalinter: buildir: package "netip" (isInitialPkg: false, needAnalyzeSource: true): in net/netip.AddrFromSlice: cannot convert Load <[]byte> t0 ([]byte) to [4]byte
 
INFO Memory: 74 samples, avg is 306.6MB, max is 1648.7MB 
INFO Execution took 7.265989136s                  
exit status 3

not compiling after updating to 1.51.1

Code example or link to a public repository

https://git.sr.ht/~rjarry/aerc

@mpldr mpldr added the bug Something isn't working label Feb 11, 2023
@ldez
Copy link
Member

ldez commented Feb 11, 2023

Hello,

you have checked the following box:

[x] Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.). (https://golangci-lint.run/usage/linters/)

go-ruleguard is related to gocritic, can you give me the output of the run of the standalone binary of gocritic? (golangci-lint v1.51.x uses [email protected], golangci-lint v1.49 uses [email protected])

can you also provide the version of golangci-lint you are using?
FYI go1.20 is supported since v1.51.0, the previous version of golangci-lint doesn't work with go1.20.

@ldez ldez added the feedback required Requires additional feedback label Feb 11, 2023
@mpldr
Copy link
Author

mpldr commented Feb 11, 2023

The output is exactly the same. Should I raise this issue with gocritic instead?

$ go get github.com/go-critic/go-critic/cmd/[email protected]
$ go run github.com/go-critic/go-critic/cmd/gocritic
# github.com/quasilyte/go-ruleguard/ruleguard
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:26:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:102:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:118:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:134:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:150:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:166:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:215:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:325:51: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:339:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:354:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:354:50: too many errors

@ldez
Copy link
Member

ldez commented Feb 11, 2023

Yes, you have to check if an issue already exists on the go-critic repository, and if there is no existing issue you can open a new issue on the go-critic repository.

FYI, go1.20 is supported since v1.51.0, the previous version of golangci-lint doesn't work with go1.20.

@ldez ldez added the dependencies Relates to an upstream dependency label Feb 11, 2023
@ldez ldez changed the title Issues running under 1.20 go-critic/go-ruleguard: issues running under 1.20 Feb 11, 2023
@ldez ldez removed the feedback required Requires additional feedback label Feb 11, 2023
@mpldr
Copy link
Author

mpldr commented Feb 19, 2023

Bad news:

$ go get -u github.com/golangci/golangci-lint/cmd/golangci-lint@master
go: upgraded github.com/cespare/xxhash/v2 v2.1.2 => v2.2.0
go: upgraded github.com/fsnotify/fsnotify v1.5.4 => v1.6.0
go: upgraded github.com/go-toolsmith/astcopy v1.0.1 => v1.1.0
go: upgraded github.com/golangci/golangci-lint v1.49.0 => v1.51.2-0.20230219142757-a775985f5de4
go: upgraded github.com/hashicorp/errwrap v1.0.0 => v1.1.0
go: upgraded github.com/inconshreveable/mousetrap v1.0.0 => v1.1.0
go: upgraded github.com/mattn/go-isatty v0.0.16 => v0.0.17
go: upgraded github.com/mattn/go-runewidth v0.0.13 => v0.0.14
go: upgraded github.com/prometheus/common v0.32.1 => v0.39.0
go: upgraded github.com/prometheus/procfs v0.7.3 => v0.9.0
go: upgraded github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 => v0.0.0-20221002170852-631b4cfd0c04
go: upgraded github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 => v0.0.0-20210819130434-b3f0c404a727
go: upgraded github.com/rivo/uniseg v0.2.0 => v0.4.3
go: upgraded github.com/spf13/viper v1.12.0 => v1.15.0
go: upgraded github.com/stretchr/testify v1.8.0 => v1.8.1
go: upgraded go.uber.org/atomic v1.7.0 => v1.10.0
go: upgraded go.uber.org/multierr v1.6.0 => v1.9.0
go: upgraded go.uber.org/zap v1.17.0 => v1.24.0
go: upgraded golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e => v0.0.0-20230213192124-5e25df0256eb
go: upgraded golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d => v0.0.0-20230213192124-5e25df0256eb
go: upgraded golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 => v0.3.0
go: upgraded golang.org/x/tools v0.1.12 => v0.6.0
go: upgraded mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 => v0.0.0-20230125043941-70a0ce6e7b95
$ go run github.com/golangci/golangci-lint/cmd/golangci-lint run
# github.com/quasilyte/go-ruleguard/ruleguard
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:26:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:102:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:118:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:134:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:150:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:166:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:215:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:325:51: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:339:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:354:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:354:50: too many errors

@ldez
Copy link
Member

ldez commented Feb 19, 2023

@quasilyte can you take a look?

@ldez ldez reopened this Feb 19, 2023
@cristaloleg
Copy link
Contributor

cristaloleg commented Feb 19, 2023

There is a problem with versions only, not Go 1.20 bump (from what I see).

Currently gocritic is on quasilyte/gogrep 86e4605de09f, but for @mpldr it resolves as 631b4cfd0c04 (latest master, fair enough) which is incompatible with not what gocritic expects (ruleguard itself is on e78263da2dd3).

Problem is easy to reproduce by pining gogrep latest master manually via:

replace github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f => github.com/quasilyte/gogrep v0.0.0-20221002170852-631b4cfd0c04

I think the simplest fix now is to pin gogrep version manually (in golangci-lint) or give @quasilyte or me a bit of time to retag everything properly.

@cristaloleg
Copy link
Contributor

Amazing @quasilyte already tagged https://github.com/quasilyte/gogrep/releases/tag/v0.5.0 update for others should be ~soon.

@ldez
Copy link
Member

ldez commented Feb 19, 2023

it's not really clear, if I update gogrephttps://github.com/quasilyte/gogrep to v0.5.0 the problem will be fixed?

do I have to wait for releases of go-critic and go-ruleguard?

The problem seems related to the use of go get -u (deprecated and not recommended) instead of go install.

@quasilyte
Copy link
Contributor

I would assume that using this version of gocritic should fix the issues above:
https://github.com/go-critic/go-critic/releases/tag/v0.6.7

@ldez
Copy link
Member

ldez commented Feb 19, 2023

Thank you @cristaloleg and @quasilyte for your help and your reactivity ❤️

@mpldr
Copy link
Author

mpldr commented Feb 19, 2023 via email

wjam added a commit to bacalhau-project/bacalhau that referenced this issue Mar 8, 2023
Update golangci-lint to support 1.20
golangci/golangci-lint#3586
wjam added a commit to bacalhau-project/bacalhau that referenced this issue Mar 8, 2023
Update Go to ensure security updates are available. Also update
golangci-lint to support Go 1.20
(golangci/golangci-lint#3586).

Fixes #2141
wjam added a commit to bacalhau-project/bacalhau that referenced this issue Mar 8, 2023
Update Go to ensure security updates are available. Also update
golangci-lint to support Go 1.20
(golangci/golangci-lint#3586).

Fixes #2141
olgibbons pushed a commit to bacalhau-project/bacalhau that referenced this issue Mar 16, 2023
Update Go to ensure security updates are available. Also update
golangci-lint to support Go 1.20
(golangci/golangci-lint#3586).

Fixes #2141
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Relates to an upstream dependency
Projects
None yet
4 participants