Re: [go-nuts] Why does "go mod" ignore tags in this case?

2019-04-03 Thread Tom Payne
Thanks Roger. To close this topic, you were right: I'd missed that there is a special release process for v2 of a module and above, and also go's mod cache was out-of-sync as I'd been moving tags around. "go mod verify" is your friend. On Thu, 21 Feb 2019 at 09:05, roger peppe wrote: > I

Re: [go-nuts] Why does "go mod" ignore tags in this case?

2019-02-21 Thread roger peppe
I suspect it's because it's version 2. Major version v2 and above needs to have the version in the import path. So the correct import path for your package would be: github.com/twpayne/go-xdg/v2 It might be nice if the go tool complained about this at some stage of the process; I suspect

[go-nuts] Why does "go mod" ignore tags in this case?

2019-02-20 Thread twpayne
tl;dr "go mod" writes a timestamp/commit hash to go.mod when a perfectly good tag exists. I don't understand why go.mod doesn't use the tag. Given this library https://github.com/twpayne/go-xdg with a "v2.0.0" tag: https://github.com/twpayne/go-xdg/releases/tag/v2.0.0 if I create a