bwplotka / bingo

Like `go get` but for Go tools! CI Automating versioning of Go binaries in a nested, isolated Go modules.
Apache License 2.0
351 stars 29 forks source link

bingo get does not update {package}.mod go version #113

Open wiardvanrij opened 2 years ago

wiardvanrij commented 2 years ago

bingo version output:

v0.5.2

go version output:

go version go1.18 darwin/arm64

What happened:

I'm running with bingo get github.com/plexsystems/promdoc@v0.7.0

which looks like:

module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.15

require github.com/plexsystems/promdoc v0.7.0

Then I did the update with: bingo get github.com/plexsystems/promdoc@v0.8.0

and I got:

module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.15

require github.com/plexsystems/promdoc v0.8.0

What you expected to happen:

Getting:

module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.18

require github.com/plexsystems/promdoc v0.8.0

How to reproduce it (as minimally and precisely as possible):

already described

Logs (use bingo get -v <thing you do> for verbose output):

Anything else we need to know:

I fixed this by removing {package}.mod (in this case promdoc.mod and then run the get on v.0.8.0

bwplotka commented 2 years ago

Hey, thanks for reporting.

I assume you mean it does not work because the go statement is still 1.15?

Yea, we don't change go statement version for compatibility. In practice this is never needed, unless you want to use potentially new commands in .mod file which bingo does not sue. Why you want that go version to be improved?

wiardvanrij commented 2 years ago

Well I just noticed it because I first checked the package on github and saw that they changed their mod file. I think it's "weird" or if anything, a little bit confusing to not exactly use the 'upstream' mod file. If you have a clean setup and use the bingo get we do get the exact version. So that does not make it consistent.

I personally don't have a strong opinion about how it should work.

bwplotka commented 2 years ago

Just to be strict, exeat version of go? Because that is simply version of Go module format nothing else (: