Cannot run ipfs --version. The failure happened at the "go get" stage. Current version is v0.4.22.
$ go get github.com/ipfs/go-ipfs
go: finding github.com/ipfs/go-ipfs v0.4.22
go: downloading github.com/ipfs/go-ipfs v0.4.22
go: extracting github.com/ipfs/go-ipfs v0.4.22
go get: github.com/ipfs/[email protected] requires
github.com/go-critic/[email protected]: invalid pseudo-version: does not match version-control timestamp (2019-02-10T22:04:43Z)
The version of go-critic that go-ipfs requires has the wrong timestamp. It feels odd to have installation held up on a linter, which 99% of clients will never run.
There's a replace statement you can use in go.mod to solve this issue
replace github.com/go-critic/go-critic v0.0.0-20181204210945-ee9bf5809ead => github.com/go-critic/go-critic v0.3.5-0.20190526074819-1df300866540
Alternatively a neat thing you can do with go modules is list require the dependency like so:
require github.com/go-critic/go-critic ee9bf5809ead
gomodules allows you to reference the commit hash directly which is also a workaround for this.
@bonedaddy I am new to go modules, so that's welcome information. Thank you.
The full list of replace statements I needed to add to go.mod are:
replace github.com/go-critic/go-critic v0.0.0-20181204210945-ee9bf5809ead => github.com/go-critic/go-critic v0.3.5-0.20190210220443-ee9bf5809ead
replace github.com/go-critic/go-critic v0.0.0-20181204210945-c3db6069acc5 => github.com/go-critic/go-critic v0.3.5-0.20190422201921-c3db6069acc5
replace github.com/golangci/errcheck v0.0.0-20181003203344-ef45e06d44b6 => github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6
replace github.com/golangci/go-tools v0.0.0-20180109140146-af6baa5dc196 => github.com/golangci/go-tools v0.0.0-20190318060251-af6baa5dc196
replace github.com/golangci/gofmt v0.0.0-20181105071733-0b8337e80d98 => github.com/golangci/gofmt v0.0.0-20181222123516-0b8337e80d98
replace github.com/golangci/gosec v0.0.0-20180901114220-66fb7fc33547 => github.com/golangci/gosec v0.0.0-20190211064107-66fb7fc33547
replace github.com/golangci/lint-1 v0.0.0-20180610141402-ee948d087217 => github.com/golangci/lint-1 v0.0.0-20190420132249-ee948d087217
replace mvdan.cc/unparam v0.0.0-20190124213536-fbb59629db34 => mvdan.cc/unparam v0.0.0-20190209190245-fbb59629db34
I'm going to leave this opened and pinned until 0.5.0.
This fixes it for me on Go 1.13:
go mod edit \
-replace github.com/go-critic/go-critic=github.com/go-critic/[email protected] \
-replace github.com/golangci/errcheck=github.com/golangci/[email protected] \
-replace github.com/golangci/go-tools=github.com/golangci/[email protected] \
-replace github.com/golangci/gofmt=github.com/golangci/[email protected] \
-replace github.com/golangci/gosec=github.com/golangci/[email protected] \
-replace github.com/golangci/lint-1=github.com/golangci/[email protected] \
-replace mvdan.cc/unparam=mvdan.cc/[email protected] \
-replace golang.org/x/xerrors=golang.org/x/[email protected]
As far as I can tell, this is fixed with the upcoming v0.4.23
Hmm, actually no. It would be nice though.
That _should_ be fixed in 0.4.23. It builds with go 1.13, at least.
I'll try clearing my cache.
Works for me?
Ha yes, it's through go-ds-s3:
go: github.com/ipfs/[email protected] requires
github.com/ipfs/[email protected] requires
github.com/go-critic/[email protected]: invalid pseudo-version: does not match version-control timestamp (2019-02-10T22:04:43Z)
Yeah, let's update that and cut a patch release once 0.4.23 is out.
Go-ipfs 0.4.23 has been released and a release/v0.4.23 branch has been created for go-ds-s3.
Most helpful comment
I'm going to leave this opened and pinned until 0.5.0.