Can't build
Clem- opened this issue · 6 comments
With the last version, I can't build datadash :
go: downloading github.com/rivo/uniseg v0.4.4
../../../../pkg/mod/github.com/mattn/go-runewidth@v0.0.14/runewidth.go:7:2: found packages uniseg (doc.go) and main (gen_breaktest.go) in /home/user/go/pkg/mod/github.com/rivo/uniseg@v0.4.4
Hi @Clem- ,
In the last release we bumped the library dependencies up to the latest versions so you'll need to do a "go get -u ./..." in the base directory if the compiler complains. That should download the latest required libs.
Thanks,
Keith
Unfortunately, it doesn't seem to solve the issue:
❯ cd go/src/github.com/keithknott26/datadash
❯ go get -u ./...
go: github.com/mattn/go-runewidth upgrade => v0.0.14
go: github.com/rivo/uniseg upgrade => v0.4.4
go: gopkg.in/alecthomas/kingpin.v2 upgrade => v2.3.2
go get: gopkg.in/alecthomas/kingpin.v2@v2.2.6 updating to
gopkg.in/alecthomas/kingpin.v2@v2.3.2: parsing go.mod:
module declares its path as: github.com/alecthomas/kingpin/v2
but was required as: gopkg.in/alecthomas/kingpin.v2
❯ go build cmd/datadash.go
../../../../pkg/mod/github.com/mattn/go-runewidth@v0.0.14/runewidth.go:7:2: found packages uniseg (doc.go) and main (gen_breaktest.go) in /home/user/go/pkg/mod/github.com/rivo/uniseg@v0.4.4
I have deleted the repo and reinstall go.
And now I have this message:
❯ go get -u github.com/keithknott26/datadash
go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,
like 'go install example.com/cmd@latest'
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
Hmm, i'm not sure because the go.mod file is definitely in the repo. I just tried to build locally and it works, did you switch into the repo directory that was just downloaded?
`
➜ keithknott26 cd datadash
➜ datadash git:(master) ✗ ls
LICENSE README.md cmd datadash dockerfile go.mod go.sum images pkg ring.go row.go src tools uniq.go
➜ datadash git:(master) ✗ go get -u ./...
➜ datadash git:(master) ✗ go build/cmd/datadash.go
`
Thanks for your replies, Keith!
I managed to build it following those commands :
git clone https://github.com/keithknott26/datadash.git
cd datadash
go build cmd/datadash.go
The README commands, especially the first one go get ...
is indeed deprecated with the recent go version.