gl
gl copied to clipboard
README: stop suggesting GOARCH=js go get since it no longer works
I am sorry, this may be very basic but I am trying to use this library and I try to run
GOARCH=js go get -u -d github.com/goxjs/gl/...
I get unsupported GOOS/GOARCH pair darwin/js I have tried a series of pairs like js/js or /js or js/darwin and I get the same message everytime.
Am I doing something wrong? does the library need to be updated?
The intention behind that command was to fetch the GopherJS dependencies of gl.
I think the go command has gotten stricter about rejecting unsupported GOOS/GOARCH combinations. In the past, it allowed unsupported ones for the purposes of go get -d, which only downloads code.
I think a workaround is to rely on specifying js as a build tag:
go get -u -d -tags=js github.com/goxjs/gl/...
That should work. I'll have to update the README. Thanks for reporting the problem!
Thanks for the quick response, that definitely sheds like on the problem. I seem to have another problem. I cannot seem to build a project with gopherjs and it might be because it is a module? I can build the goxjs/example projects but I get github.com/go-gl/gl/v2.1/gl: importing "C" is not supported by GopherJS when trying to build my project that is a go module. Any idea why that might be? Could it be that the dependencies are not resolved correctly in a module system?
It is related to your project using modules. Unfortunately, the current version of GopherJS on the master branch does not have support for modules yet. This is issue https://github.com/gopherjs/gopherjs/issues/855.
Great as always @dmitshur! Keep kicking butts!
I'm glad I was helpful with this. :)
If you don't mind, I'll reopen this issue and use it to update the README with the new instructions.