go-gl / mathgl

A pure Go 3D math library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while trying to get library: undefined: sync.Pool

opened this issue · comments

I'm trying to get github.com/go-gl/mathgl/mgl32 and getting the following error:

$ go get github.com/go-gl/mathgl/mgl32
# github.com/go-gl/mathgl/mgl32
src/github.com/go-gl/mathgl/mgl32/mempool.go:12: undefined: sync.Pool
src/github.com/go-gl/mathgl/mgl32/mempool.go:29: undefined: sync.Pool
src/github.com/go-gl/mathgl/mgl32/mempool.go:41: undefined: sync.Pool

Here is my version of go:

$ go version
go version go1.2.1 linux/amd64

sync.Pool was added in go 1.3.

@pwaller Yeah, I know. But github.com/go-gl/mathgl/mgl32 works in go 1.2.2 as well, because of tag in git repository. Could you add such tag for go 1.2.1?

Do you have some hard constraint keeping you on Go 1.2.1? If not, I highly recommend updating to the latest 1.4.2. It will perform better and you will run into fewer bugs (a lot of issues have been fixed/improved since 1.2.1). Updating is easy and compatible with existing code.

Ugh, I didn't know that I have to tag each minor version individually. Still, you're missing a ton of package development if you stick with 1.2.1, including bug fixes that will be undocumented to you. (I think we may have fixed a bug in the rotation matrices or something since then). Unfortunately, we just don't have the time/manpower to curate bugfixes for old Go versions.

If you can, I'd really recommend at least upgrading to 1.2.2. If it's impossible, I'll try and add the 1.2.1 tag to the commit with the 1.2.2 tag, with the caveat that I really don't recommend using it.

On review, perhaps we could refactor Mat/VecMN out of the core packages.

If we switch to RMO in order to comply with the Go f32 package, we should probably get rid of them anyway, and encourage people to use github.com/gonum/matrix for MN functionality.