bingo
bingo copied to clipboard
Go version doesn't update
bingo version
output: v0.4.0
go version
output: go version go1.16.3 darwin/amd64
What happened: updated Go
to 1.16
from 1.15
and then bingo to v0.4.0
from v0.2.3
via bingo get -u github.com/bwplotka/bingo
but .bingo/bingo.mod
still reads:
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.15
require github.com/bwplotka/bingo v0.4.0
What you expected to happen: for the file to read go 1.16
How to reproduce it (as minimally and precisely as possible): Bump the go version of a project that already has Bingo in it. Then update one of the tool dependencies. The .mod
file will have the previous go version still.
Logs (use bingo get -v <thing you do>
for verbose output):
bingo get -v -u github.com/bwplotka/bingo
getting target github.com/bwplotka/bingo (module github.com/bwplotka/bingo )
exec 'go mod init -modfile=/Users/matiasanaya/code/src/github.com/kaddyteam/api/.bingo/bingo-e.tmp.mod _'
exec 'go get -modfile=/Users/matiasanaya/code/src/github.com/kaddyteam/api/.bingo/bingo-e.tmp.mod -d -u github.com/bwplotka/bingo'
exec 'go env GOPATH'
exec 'go list -modfile=/Users/matiasanaya/code/src/github.com/kaddyteam/api/.bingo/bingo.tmp.mod -mod=mod -f={{.Name}} github.com/bwplotka/bingo'
exec 'go build -modfile=/Users/matiasanaya/code/src/github.com/kaddyteam/api/.bingo/bingo.tmp.mod -o=/Users/matiasanaya/go/bin/bingo-v0.4.0 github.com/bwplotka/bingo'
Hey! Does this version.. matters? (:
What exactly you expect the flow looking like?
EDIT: I am pretty sure we use native go method to create go mod file, so this should match the go version you use 🤔
I double checked and can't reproduce, it works with Go 1.16 and adds Go 1.16:
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.16
require github.com/gohugoio/hugo v0.83.1
Hello @bwplotka, not sure if the version matters, but what I'm seeing is that if I use bingo get
to update a dependency after I've updated my version of go
the go version
doesn't update in the already existing mod
file, only the dependency version.
On the other hand, if I unpin the dependency by doing @none
and then re-install it, the go version
is correct in the newly created mod
file.
Makes sense?
I would have expected the mod
file to always reflect the go version
that was used to generate it, regardless of it being an update or a create from scratch, but this might be an issue with the native go method.
Thanks! Something tiny to improve then. Marking as bug and help wanted 🤗