go-consistent: Module rename has broken indirectly golangci-lint
Your latest commit s/Quasilyte/quasilyte
might have broken projects that reference indirectly (maybe even directly, not sure) go-consistent
since go mod
is case-sensitive and checks the paths (see this issue).
I am not sure if this is the right place to report it, but since it is the source of the error, I just wanted to warn you in case it is an unexpected side effect. The dependency chain is golangci-lint -> go-critic -> go-consistent
.
To reproduce:
GO111MODULE=on go get -u github.com/golangci/golangci-lint/cmd/golangci-lint@master
go: finding github.com/golangci/golangci-lint/cmd/golangci-lint master
go: finding github.com/golangci/golangci-lint/cmd master
go: finding github.com/golangci/golangci-lint master
go: finding github.com/golangci/goconst latest
...
go: finding github.com/golangci/unconvert latest
go: github.com/Quasilyte/go-consistent@v0.0.0-20190521200055-c6f3937de18c: parsing go.mod: unexpected module path "github.com/quasilyte/go-consistent"
go: finding github.com/logrusorgru/aurora latest
go: finding gopkg.in/tomb.v1 latest
go: finding github.com/StackExchange/wmi latest
go get: error loading module requirements
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 16 (8 by maintainers)
Commits related to this issue
- fix dependencies Refs https://github.com/quasilyte/go-consistent/issues/34 Signed-off-by: Iskander Sharipov <quasilyte@gmail.com> — committed to go-critic/go-critic by quasilyte 5 years ago
- fix dependencies (#857) (I was not struggling with this commit at all. Not a bit. No.) Refs https://github.com/quasilyte/go-consistent/issues/34 Signed-off-by: Iskander Sharipov <quasilyte@gmai... — committed to go-critic/go-critic by quasilyte 5 years ago
- tools: move tools into own module (#1162) See https://github.com/quasilyte/go-consistent/issues/34 — committed to go-critic/go-critic by AlekSi 3 years ago
I believe it’s mostly true for libraries.
I hear you, but again, those are released libraries intended for public use. Go-consistent is a linter, not something that others can/should depend on inside their modules. The problem is that it made it’s way into dependencies tree of golangci-lint. We should probably concentrate on that. This is my point of view.
I’ve found a solution, it’s not super satisfactory, but seems to work in circleci:
go get github.com/golangci/golangci-lint/cmd/golangci-lint@de1d1ad
It came from this: https://github.com/golang/go/issues/31148