Skip to content

build: almost complete module support #33

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

Merged
merged 1 commit into from
Nov 27, 2018
Merged

build: almost complete module support #33

merged 1 commit into from
Nov 27, 2018

Conversation

myitcv
Copy link
Owner

@myitcv myitcv commented Nov 23, 2018

This is a necessarily large PR to offer almost complete Go modules
support for GopherJS.

  • We now use github.com/rogpeppe/go-internal to be able to write testscript
    tests
  • A suite of testscript tests have been added to cover the major GopherJS
    commands operating in both GOPATH mode and module mode. Includes a test to
    ensure that the bug raised in package in GOPATH shadows module #27 is now properly fixed.
  • The GopherJS tool and build packages have been heavily refactored in places to
    support Go modules. GopherJS support for Go modules follows the same patterns
    as the go tool.
  • We fix the build cache to be a function of the augmented packages as opposed
    (incorrectly) to the unaugmented package files. This has a slight cost because
    of the way the augmentation code is currently written (this could be refactored
    in a later PR) because every file is unconditionally parsed. Main and test
    packages are not cached (again, we could change this in a later PR). Because it
    would just work.
  • We fix the tests/run.go wrapper around the fixedbugs tests in the Go
    distribution to not perform a chdir into GOROOT; this does not work with
    modules.
  • We tidy up .circleci/config.yml to split commands into their separate run
    sections where it makes sense to.
  • We add genmodstubbs.go to automatically populate the stubs we need in
    testdata/mod for the loading of github.com/gopherjs/gopherjs/{js,nosync}.
  • For a more current commentary on the Go module support in GopherJS see
    https://github.com/myitcv/gopherjs/wiki/Changes-in-module-aware-GopherJS

Fixes #24
Fixes #27

@myitcv myitcv force-pushed the fix_cache branch 21 times, most recently from bbf835f to d1e28e8 Compare November 27, 2018 10:03
@myitcv myitcv changed the title build: calculate hash key based on augmented package files build: almost complete module support Nov 27, 2018
@myitcv myitcv force-pushed the fix_cache branch 3 times, most recently from 5618685 to 0a4a43e Compare November 27, 2018 11:41
This is a necessarily large PR to offer almost complete Go modules
support for GopherJS.

* We now use github.com/rogpeppe/go-internal to be able to write testscript
  tests
* A suite of testscript tests have been added to cover the major GopherJS
  commands operating in both GOPATH mode and module mode.  Includes a test to
  ensure that the bug raised in #27 is now properly fixed.
* The GopherJS tool and build packages have been heavily refactored in places to
  support Go modules. GopherJS support for Go modules follows the same patterns
  as the go tool.
* We fix the build cache to be a function of the augmented packages as opposed
  (incorrectly) to the unaugmented package files. This has a slight cost because
  of the way the augmentation code is currently written (this could be refactored
  in a later PR) because every file is unconditionally parsed. Main and test
  packages are not cached (again, we could change this in a later PR). Because it
  would just work.
* We fix the tests/run.go wrapper around the fixedbugs tests in the Go
  distribution to not perform a chdir into GOROOT; this does not work with
  modules.
* We tidy up .circleci/config.yml to split commands into their separate run
  sections where it makes sense to.
* We add genmodstubbs.go to automatically populate the stubs we need in
  testdata/mod for the loading of github.com/gopherjs/gopherjs/{js,nosync}.
* For a more current commentary on the Go module support in GopherJS see
  https://github.com/myitcv/gopherjs/wiki/Changes-in-module-aware-GopherJS

Fixes #24
Fixes #27
@myitcv myitcv merged commit 4d506bd into master Nov 27, 2018
@myitcv myitcv deleted the fix_cache branch November 27, 2018 12:33
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

Successfully merging this pull request may close these issues.

package in GOPATH shadows module Go 1.11 (modules) issues
1 participant