tsenart / vegeta

HTTP load testing tool and library. It's over 9000!
http://godoc.org/github.com/tsenart/vegeta/lib
MIT License
23.51k stars 1.36k forks source link

lib git tags naming scheme incompatible with go modules #357

Closed fenollp closed 5 years ago

fenollp commented 5 years ago

Hi there,

Trying to setup a project on go1.11 using go mod and the vegeta lib. So basically I set up a new project outside $GOPATH with the example code from the README.md then ran go mod init github.com/fenollp/bla then go build complains that vegeta.Rate doesn't exist.

The issue is that go modules are very restrictive in the naming of the tags they can use. They want tags of the form vX.Y.Z where X,Y,Z are digits.

The things is you're prepending cli/ and lib/ to your tags and while that makes sense it makes it impossible to use go modules as well as a version of vegeta that's more recent than v8.0.0 (as this was the last tag that go mod is happy with).

So what do you think about tagging lib releases with vX.Y.Z as well as lib/vX.Y.Z (and keep tagging CLI the same way as a go project is unlikely to depend on the CLI version through go mod)?

Thanks

fenollp commented 5 years ago

As a temporary workaround I tagged my own fork.

tsenart commented 5 years ago

I think this sounds reasonable. I'll update the README to explain this and push the appropriate tags going forward.

fenollp commented 5 years ago

Amazing! Looking forward to the next tag :)

tsenart commented 5 years ago

Done!