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

Most upvoted comments

Changes like that are breaking changes. They can end up having wide repercussions across the ecosystem

I believe it’s mostly true for libraries.

For example, Sirupsen/logrus vs. sirupsen/logrus has caused a large amount of churn (see for example golang/go#28489). A similar but slightly different example is golang.org/x/lint vs. github.com/golang/lint (e.g., golang/lint#436 and golang/go#30831), where the ecosystem was using two different import paths and introducing a canonical name in the go.mod caused problems for many consumers.

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