Skip to content
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

Experiment: use go/packages instead of go/build for easier build system support #947

Open
nevkontakte opened this issue Oct 20, 2019 · 0 comments

Comments

@nevkontakte
Copy link
Contributor

@nevkontakte nevkontakte commented Oct 20, 2019

Earlier this year, Go Team presented golang.org/x/tools/go/packages as build system-agnostic interface for tooling authors. At the moment GopherJS uses go/build as a main way to load packages, which lacks Go Modules support and is strongly tied to the go tool.

In theory, switch to go/packages should offer several advantages:

  • Transparent build system integration, lesser chance to be affected by changes in go build tooling. As a corollary, this should provide Go Module support "for free".
  • An avenue for integrating GopherJS with other build systems (bazel.io and friends).
  • A possibility to remove a lot of custom code from the gopherjs/build package, which is handling loading packages in different ways.

How much of that proves to be true, is yet to be seen, but I'll start an experiment.

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.