gojuno / minimock

Powerful mock generation tool for Go programming language
MIT License
577 stars 38 forks source link

go get -u Fails with Minimock #42

Closed biffen closed 4 years ago

biffen commented 4 years ago

Lately (since Minimock started using Go modules, it seems) we’ve had trouble running go get -u on several projects that use Minimock. It always fails with:

go: github.com/gojuno/minimock@v0.0.0-20190826163438-7e61077391e9: go.mod has post-v0 module path "github.com/gojuno/minimock/v3" at revision 7e61077391e9

(The timestamp and commit ID aren’t always the same, but seem to point to the latest release.)

We believe the cause is Minimock, since we’re not seeing anything like it with any other module, and the error can be reproduced with a minimal project containing only a main.go:

package main

import (
    _ "github.com/gojuno/minimock/v3"
)

func main() {}

And running go mod init example.com/test creates a go.mod file like:

module example.com/test

go 1.12

require github.com/gojuno/minimock/v3 v3.0.2

Then running go get -u results in the error above.

Not that we claim to fully understand the error messsage, but could there be something wrong with Minimock’s go.mod? Or is there something we’re doing wrong?


Thanks in advance and thanks for the nice software!

hexdigest commented 4 years ago

Hi @biffen

Thanks for posting this issue! Please try require github.com/gojuno/minimock/v3 v3.0.4

And check if it works for you.

biffen commented 4 years ago

@hexdigest That does indeed fix it. Thanks! :smile: