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

README: stop suggesting GOARCH=js go get since it no longer works #29

Open
tanema opened this Issue Feb 11, 2019 · 5 comments

Comments

Projects
None yet
2 participants
@tanema
Copy link
Contributor

tanema commented Feb 11, 2019

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?

@dmitshur

This comment has been minimized.

Copy link
Member

dmitshur commented Feb 11, 2019

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!

@tanema

This comment has been minimized.

Copy link
Contributor Author

tanema commented Feb 11, 2019

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?

@dmitshur

This comment has been minimized.

Copy link
Member

dmitshur commented Feb 11, 2019

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 gopherjs/gopherjs#855.

@tanema

This comment has been minimized.

Copy link
Contributor Author

tanema commented Feb 11, 2019

Great as always @dmitshur! Keep kicking butts!

@tanema tanema closed this Feb 11, 2019

@dmitshur

This comment has been minimized.

Copy link
Member

dmitshur commented Feb 11, 2019

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.

@dmitshur dmitshur reopened this Feb 11, 2019

@dmitshur dmitshur changed the title unsupported GOOS/GOARCH pair darwin/js README: stop suggesting GOARCH=js go get since it no longer works Feb 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment