Closed
Description
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. (https://golangci-lint.run/usage/linters/)
Description of the problem
golangci-lint run --disable-all -E staticcheck ./...
ERRO [runner] Panic: buildir: package "shuffle" (isInitialPkg: true, needAnalyzeSource: true): in github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.init: cannot convert github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.fixedLengthShuffle (func[T github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.fixedLength](vs []T, ws []T, sels []int64) []T) to func(vs []int8, ws []int8, sels []int64) []int8: goroutine 25269 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:24 +0x68
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1()
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:101 +0x104
panic({0x10304c6a0, 0x1400f242950})
runtime/panic.go:838 +0x204
honnef.co/go/tools/go/ir.emitConv(0x14008c66b40, {0x1031cab98, 0x14008c66c80}, {0x1031c0d80?, 0x1400ca5c8c0}, {0x0, 0x0})
honnef.co/go/[email protected]/go/ir/emit.go:293 +0xb0c
honnef.co/go/tools/go/ir.emitStore(0x14008c66b40, {0x1031cac68, 0x1400bdff220}, {0x1031cab98, 0x14008c66c80}, {0x0, 0x0})
honnef.co/go/[email protected]/go/ir/emit.go:302 +0x68
honnef.co/go/tools/go/ir.(*address).store(0x14007300f40, 0x14008c66b40?, {0x1031cab98?, 0x14008c66c80?}, {0x0?, 0x0?})
honnef.co/go/[email protected]/go/ir/lvalue.go:37 +0x5c
honnef.co/go/tools/go/ir.(*builder).assign(0x103088b80?, 0x14011ac4930?, {0x1031c6050, 0x14007300f40}, {0x1031c3be0?, 0x1401564dbf0?}, 0x0?, 0x0, {0x0, 0x0})
honnef.co/go/[email protected]/go/ir/builder.go:542 +0x628
honnef.co/go/tools/go/ir.(*Package).build(0x14016ad55f0)
honnef.co/go/[email protected]/go/ir/builder.go:2568 +0x90c
sync.(*Once).doSlow(0x1400b7860e0?, 0x1400bdc20f0?)
sync/once.go:68 +0x10c
sync.(*Once).Do(...)
sync/once.go:59
honnef.co/go/tools/go/ir.(*Package).Build(...)
honnef.co/go/[email protected]/go/ir/builder.go:2505
honnef.co/go/tools/internal/passes/buildir.run(0x1401336c8f0)
honnef.co/go/[email protected]/internal/passes/buildir/buildir.go:86 +0x28c
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0x140058ff3d0)
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:187 +0x96c
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:105 +0x24
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0x14001c79860, {0x102d7b99c, 0x7}, 0x14002ea2730)
github.com/golangci/golangci-lint/pkg/timeutils/stopwatch.go:111 +0x48
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0x10296a640?)
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:104 +0x78
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0x140058ff3d0)
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:80 +0xb4
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:75 +0x16c
WARN [runner] Can't run linter staticcheck: staticcheck: buildir: package "shuffle" (isInitialPkg: true, needAnalyzeSource: true): in github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.init: cannot convert github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.fixedLengthShuffle (func[T github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.fixedLength](vs []T, ws []T, sels []int64) []T) to func(vs []int8, ws []int8, sels []int64) []int8
ERRO Running error: 1 error occurred:
* can't run linter staticcheck: staticcheck: buildir: package "shuffle" (isInitialPkg: true, needAnalyzeSource: true): in github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.init: cannot convert github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.fixedLengthShuffle (func[T github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.fixedLength](vs []T, ws []T, sels []int64) []T) to func(vs []int8, ws []int8, sels []int64) []int8
Version of golangci-lint
golangci-lint --version
golangci-lint has version 1.46.1 built from 044f0a17 on 2022-05-12T09:23:45Z
Configuration file
no .golongci.yml, only enable staticcheck by command line.
$ cat .golangci.yml
# paste output here
Go environment
go version go1.18.1 darwin/arm64
GO111MODULE="on"
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/maomao/Library/Caches/go-build"
GOENV="/Users/maomao/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/maomao/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/maomao/go"
GOPRIVATE=""
GOPROXY="https://mirrors.tencent.com/go,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.18.1"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/maomao/code/matrixone/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/v4/9c736kps76jbbvf97snf3s9w0000gn/T/go-build2062840899=/tmp/go-build -gno-record-gcc-switches -fno-common"
Verbose output of running
INFO [config_reader] Config search paths: [./ /Users/maomao/code/matrixone /Users/maomao/code /Users/maomao /Users /]
INFO [lintersdb] Active 1 linters: [staticcheck]
INFO [loader] Go packages loading at mode 575 (files|imports|types_sizes|compiled_files|deps|exports_file|name) took 1.702499333s
INFO [runner/filename_unadjuster] Pre-built 2 adjustments in 94.23975ms
INFO [linters context/goanalysis] analyzers took 1m14.602552617s with top 10 stages: buildir: 32.000991883s, fact_purity: 2.532383466s, nilness: 2.500163266s, typedness: 2.372219817s, fact_deprecated: 2.121536948s, SA5012: 1.916474125s, SA1012: 1.229031041s, SA4030: 1.048752863s, SA1004: 1.005119633s, SA4023: 896.485827ms
ERRO [runner] Panic: buildir: package "shuffle" (isInitialPkg: true, needAnalyzeSource: true): in github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.init: cannot convert github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.fixedLengthShuffle (func[T github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.fixedLength](vs []T, ws []T, sels []int64) []T) to func(vs []int8, ws []int8, sels []int64) []int8: goroutine 21455 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:24 +0x68
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1()
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:101 +0x104
panic({0x105a686a0, 0x1404bab2ac0})
runtime/panic.go:838 +0x204
honnef.co/go/tools/go/ir.emitConv(0x14019ecc280, {0x105be6b98, 0x14019ecc3c0}, {0x105bdcd80?, 0x1405a52fd80}, {0x0, 0x0})
honnef.co/go/[email protected]/go/ir/emit.go:293 +0xb0c
honnef.co/go/tools/go/ir.emitStore(0x14019ecc280, {0x105be6c68, 0x14041b78410}, {0x105be6b98, 0x14019ecc3c0}, {0x0, 0x0})
honnef.co/go/[email protected]/go/ir/emit.go:302 +0x68
honnef.co/go/tools/go/ir.(*address).store(0x1404b2788c0, 0x14019ecc280?, {0x105be6b98?, 0x14019ecc3c0?}, {0x0?, 0x0?})
honnef.co/go/[email protected]/go/ir/lvalue.go:37 +0x5c
honnef.co/go/tools/go/ir.(*builder).assign(0x105aa4b80?, 0x1405b0f0990?, {0x105be2050, 0x1404b2788c0}, {0x105bdfbe0?, 0x1405a175d10?}, 0x0?, 0x0, {0x0, 0x0})
honnef.co/go/[email protected]/go/ir/builder.go:542 +0x628
honnef.co/go/tools/go/ir.(*Package).build(0x1405ba78bd0)
honnef.co/go/[email protected]/go/ir/builder.go:2568 +0x90c
sync.(*Once).doSlow(0x1405a2275e0?, 0x1405a540370?)
sync/once.go:68 +0x10c
sync.(*Once).Do(...)
sync/once.go:59
honnef.co/go/tools/go/ir.(*Package).Build(...)
honnef.co/go/[email protected]/go/ir/builder.go:2505
honnef.co/go/tools/internal/passes/buildir.run(0x1405a547ad0)
honnef.co/go/[email protected]/internal/passes/buildir/buildir.go:86 +0x28c
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0x14005983550)
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:187 +0x96c
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:105 +0x24
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0x14002155770, {0x10579799c, 0x7}, 0x140026b2f30)
github.com/golangci/golangci-lint/pkg/timeutils/stopwatch.go:111 +0x48
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0x105386640?)
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:104 +0x78
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0x14005983550)
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:80 +0xb4
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze
github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:75 +0x16c
WARN [runner] Can't run linter staticcheck: staticcheck: buildir: package "shuffle" (isInitialPkg: true, needAnalyzeSource: true): in github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.init: cannot convert github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.fixedLengthShuffle (func[T github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.fixedLength](vs []T, ws []T, sels []int64) []T) to func(vs []int8, ws []int8, sels []int64) []int8
INFO [runner] processing took 6.625µs with stages: skip_dirs: 1.709µs, nolint: 1.667µs, max_same_issues: 1.541µs, max_from_linter: 458ns, cgo: 334ns, max_per_file_from_linter: 250ns, uniq_by_line: 167ns, path_prettifier: 125ns, filename_unadjuster: 125ns, sort_results: 42ns, path_prefixer: 42ns, source_code: 42ns, identifier_marker: 41ns, skip_files: 41ns, severity-rules: 41ns, exclude: 0s, diff: 0s, autogenerated_exclude: 0s, exclude-rules: 0s, path_shortener: 0s
INFO [runner] linters took 10.61532175s with stages: staticcheck: 10.613429875s
ERRO Running error: 1 error occurred:
* can't run linter staticcheck: staticcheck: buildir: package "shuffle" (isInitialPkg: true, needAnalyzeSource: true): in github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.init: cannot convert github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.fixedLengthShuffle (func[T github.com/matrixorigin/matrixone/pkg/vectorize/shuffle.fixedLength](vs []T, ws []T, sels []int64) []T) to func(vs []int8, ws []int8, sels []int64) []int8
INFO Memory: 125 samples, avg is 1374.6MB, max is 4159.3MB
INFO Execution took 12.429372958s