3

I tried to read the source code of tidb-lightning with GoLand. But it failed to index the project complaining with the following error message:

go: finding github.com/pingcap/tidb v3.0.4+incompatible
go: finding github.com/pingcap/tidb v3.0.4+incompatible
go list -m: github.com/pingcap/tidb@v3.0.4+incompatible: invalid version: +incompatible suffix not allowed: module contains a go.mod file, so semantic import versioning is required

But when I tried make lightning to build the binaries everything's OK.

I've googled the error message but can not find an existing solution. But I found this question and guessed that it had something to do with semver, so I updated the dependency to some v1 version and now GoLand can index it.

I wonder if this dependency is valid at all, why does go list -m all fail while go build succeed?

satoru
  • 31,822
  • 31
  • 91
  • 141

0 Answers0