asdine / storm

Simple and powerful toolkit for BoltDB
MIT License
2.06k stars 139 forks source link

v3: use semantic import versioning as required by go #256

Closed chappjc closed 5 years ago

chappjc commented 5 years ago

Resolving https://github.com/asdine/storm/issues/255

Note that this will require a v3.0.0 tag once merged to be usable by dependents.

anjmao commented 5 years ago

@asdine This PR looks correct, could we merge it?

asdine commented 5 years ago

Thank you! Sorry for the delay 🙏

chappjc commented 5 years ago

Np! Thanks for merging.

I've updated my app to import "github.com/asdine/storm/v3" and all is well on my end, even without a v3.0.0 tag.

require github.com/asdine/storm/v3 v3.0.0-20191014164809-c6fa66c747fe

via go get -u -v github.com/asdine/storm/v3.

chappjc commented 5 years ago

BTW, if go is still complaining about the invalid v2.2.0+incompatible version even if v3 is being used, you can prevent go from attempting to verify it (and failing) with a replace.

replace github.com/asdine/storm => github.com/asdine/storm v2.1.2+incompatible

Or build with GOSUMDB=off. It's a tricky issue with go right now: https://github.com/golang/go/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+incompatible+invalid+module+

I'm not sure if v2.2.0 will continue to cause issues for all consumers (github.com/asdine/storm@v2.2.0+incompatible: invalid version: +incompatible suffix not allowed: module contains a go.mod file, so semantic import versioning is required). If it does, it may be necessary to entirely deprecate the tag by making a new tag v2.2.0+deprecated at the same commit as v2.2.0.