go-gl / mathgl

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

Current package state is out of sync with code generation. #34

Closed dmitshur closed 9 years ago

dmitshur commented 9 years ago

If I run make without any changes, it results in non-zero diff.

Also, genprog/main.go is not at all mentioned in the Makefile, so I assume you must be running it manually? According the README, that is how the vector.go and matrix.go files are generated, so it should be a part of the Makefile then. See https://github.com/go-gl/mathgl/commit/e3a647b55aa04a78f7d7d297939736c4900e842d#commitcomment-9978547.

Finally, it's best to move away from Makefiles or other custom solutions for automation/generation and use a more standard go generate approach. The same commands will be executed, it's just a convention that is easier for everyone to follow. See https://github.com/go-gl/mathgl/issues/32#issuecomment-76653591.

dmitshur commented 9 years ago

Another reason why go generate is nicer is because it allows one not to worry about current working directory.

I could just run go generate github.com/go-gl/mathg/... and it'll always do the same thing (the go generate commands are always run from the directory where the Go package is located). While with genprog/main.go, running it from genprog folder will have different results than running it from mathgl folder. So I need to spend more time to figure out what cwd should be...

UserAB1236872 commented 9 years ago

Was this fixed by #39?

dmitshur commented 9 years ago

Yes, it's clean now, running go generate github.com/go-gl/mathgl/mgl32 produces no diff.