go-gl / mathgl

A pure Go 3D math library.
BSD 3-Clause "New" or "Revised" License
554 stars 65 forks source link

Package broken with Go 1.13 #83

Closed Galaco closed 5 years ago

Galaco commented 5 years ago

Attempting to build any project using go 1.13 that depends on this package yields the following error:

verifying golang.org/x/image@v0.0.0-20190321074427-3fc05d484e9f/go.mod: golang.org/x/image@v0.0.0-20190321074427-3fc05d484e9f/go.mod: reading https://sum.golang.org/lookup/golang.org/x/image@v0.0.0-20190321074427-3fc05d484e9f: 410 Gone

This is caused by the above dependency listed in mathgl's go.mod.

Using a local replacement with an updated go.mod seems to resolve the issue, but I don't really want to have to create a fork just for that reason.

Is go 1.13 planned to be supported, or shall I expect to fork this package to host a supported version myself?

dmitshur commented 5 years ago

Thanks for the issue report.

Is go 1.13 planned to be supported

Yep, absolutely.

However, I can't reproduce this issue. I think the issue might not be in this project, but in another one.

Take a look at the go.mod file of this project:

https://github.com/go-gl/mathgl/blob/592312d8590acb0686c14740dcf60e2f32d9c618/go.mod#L5

Note it requires version v0.0.0-20190321063152-3fc05d484e9f, which is not the version you mentioned above. Instead, it's a valid pseudo-version whose time matches the VCS timestamp, and the checksum database returns 200 OK for it:

https://sum.golang.org/lookup/golang.org/x/image@v0.0.0-20190321063152-3fc05d484e9f

So I suspect this bad v0.0.0-20190321074427-3fc05d484e9f version is coming from somewhere else. Can you share more information on how to reproduce the problem?

Galaco commented 5 years ago

I am sure the issue was caused by this package; the package I was attempting to build has only 1 dependency: this package. My CI build also threw a different, but (probably) related error on a branch that bumps to build to 1.13: https://circleci.com/gh/Galaco/bsp/54.

go: github.com/go-gl/mathgl@v0.0.0-20190430161326-c4601bc793c7: invalid pseudo-version: does not match version-control timestamp (2019-04-16T16:01:23Z)

Either way, I wiped my GOPATH and started over, and the issue seems to have resolved itself locally. I cannot say why.

I will close this now. Thank you for your help

dmitshur commented 5 years ago

That is strange. My best guess right now would be that there were some invalid entries in your module cache that came from much older versions of Go. Go 1.13 has started to validate pseudo-versions more strictly than before, so those issues get caught and reported. They should not re-occur, so if they do, please don't hesitate to report it.

Anyway, glad that it's resolved for you now.