Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.3.1 Breaks build #161

Closed
KillerX opened this issue Feb 12, 2019 · 12 comments
Closed

v1.3.1 Breaks build #161

KillerX opened this issue Feb 12, 2019 · 12 comments

Comments

@KillerX
Copy link

KillerX commented Feb 12, 2019

Any idea what is going on here? This has been happening for us since the 1.3.1 release.

go: finding gopkg.in/DATA-DOG/go-sqlmock.v1 v1.3.1
go: gopkg.in/DATA-DOG/[email protected]: go.mod has non-....v1 module path "sqlmock" at revision v1.3.1
@l3pp4rd
Copy link
Member

l3pp4rd commented Feb 12, 2019

Hi, most likely something is not right with the module name

@jrbarron
Copy link

I think the module name in go.mod is incorrect. The following change fixes it for me:

-module sqlmock
+module gopkg.in/DATA-DOG/go-sqlmock.v1

@l3pp4rd
Copy link
Member

l3pp4rd commented Feb 12, 2019

is it a good practice to have a gopkg.in/DATA-DOG/go-sqlmock.v1 gopkg module name? or it should rather be github.com/DATA-DOG/go-sqlmock since modules support versioning

@philtay
Copy link

philtay commented Feb 12, 2019

Initialize go.mod with:

$ go mod init github.com/DATA-DOG/go-sqlmock

You don't need gopkg.in at all.

@l3pp4rd
Copy link
Member

l3pp4rd commented Feb 12, 2019

created the v1.3.2 tag, hope that will not cause any more issues

@philtay
Copy link

philtay commented Feb 12, 2019

@l3pp4rd you can now start to migrate away from gopkg.in (if you want). i mean docs, examples, etc...

@l3pp4rd
Copy link
Member

l3pp4rd commented Feb 12, 2019

@philtay would you be kind to create a pull request?

@philtay
Copy link

philtay commented Feb 12, 2019

@l3pp4rd I can't right now, but the commands below should be enough:

$ sed -i 's/gopkg.in\/DATA-DOG\/go-sqlmock.v1/github.com\/DATA-DOG\/go-sqlmock/g' <files ... e.g. README.md>
$ git commit -a -m "Hello SemVer!"
$ git push

@smadbe
Copy link

smadbe commented Feb 12, 2019

Seems to work, do not forget to fix the README as well to use github.com/DATA-DOG/go-sqlmock (go get and import (...)).

@dolmen
Copy link
Contributor

dolmen commented Jun 17, 2019

Thanks for breaking all our go.mod files and imports. 😭

@dolmen
Copy link
Contributor

dolmen commented Jun 17, 2019

On Mac, here is the fixed sed command to change import path:

$ sed -i '' 's/gopkg.in\/DATA-DOG\/go-sqlmock.v1/github.com\/DATA-DOG\/go-sqlmock/g' *.go

@philtay
Copy link

philtay commented Jun 21, 2019

@dolmen You're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants