Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Extract js package to another repo #919

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

Closed
cristaloleg opened this issue May 18, 2019 · 4 comments
Closed

Extract js package to another repo #919

cristaloleg opened this issue May 18, 2019 · 4 comments

Comments

@cristaloleg
Copy link

cristaloleg commented May 18, 2019

Currently, while GopherJS API is presented in the package js (https://github.com/gopherjs/gopherjs/tree/master/js). And to use it every user needs to check out a quite heavy github.com/gopherjs/gopherjs repo.

I'm proposing to extract js package to a new repo (probably github.com/gopherjs/js) and alias its types in github.com/gopherjs/gopherjs/js.

The back compatibility will be safe, users will use(depend) on a much smaller package, we can introduce Go modules to the new package with out any problems(hopefully).

I hope I'm not missing something and it's possible to make. Thank you.

UPD: aliases were added in 1.9, I'm not sure what is the minimal supported version for gopherjs.

@dmitshur
Copy link
Member

dmitshur commented May 18, 2019

This is a reasonable feature request to consider. It should be possible to accomplish this, but it would take a fair bit of implementation work (which is hard due to #894). It also has the downside of potentially creating churn (people updating github.com/gopherjs/gopherjs/js import paths in various places). It's a big enough change we'd need to decide if we're willing to support it.

As an alternative, have you considered using the syscall/js API? GopherJS supports it as of version 1.12-2. See issue #899. It has the benefit of being in the standard library and no third-party package download needed at all. /cc @hajimehoshi

@hajimehoshi
Copy link
Member

syscall/js sounds enough to me for your request.

@cristaloleg
Copy link
Author

syscall/js looks like a solution, thank you.

(I will leave this issue open for some time, ok?)

@cristaloleg
Copy link
Author

Probably syscall/js is a proper solution for that. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants