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

Skip to content

Conversation

@rw
Copy link
Contributor

@rw rw commented Dec 24, 2018

Track and emit required FlatBuffers namespace imports in generated Go code.

  • Update Go code generator by moving most functionality into the generator class, to facilitate namespace tracking. (Note that the git diff in this combined commit may appear large due to this refactoring, but very little code was actually changed.)
  • Update Go code generator by tracking namespace imports when generating FlatBuffers code.
  • Update Go code generator by emitting package imports to correctly reference code in other FlatBuffers namespaces.
  • Create Go test that checks the usage of InParentNamespace objects (as defined in the example schema).
  • Create Docker test that checks the Go language port.

Fixes #4883
Fixes #3927

@rw rw requested a review from aardappel December 25, 2018 06:37
@rw rw changed the title [WIP] [Go] Namespaced imports fix [Go] Namespaced imports fix Dec 27, 2018
@rw rw merged commit 0eb7b3b into google:master Dec 28, 2018
zchee pushed a commit to zchee/flatbuffers that referenced this pull request Feb 14, 2019
Track and emit required FlatBuffers namespace imports in generated Go code.

Update Go code generator by moving most functionality into the generator class, to facilitate namespace tracking. (Note that the git diff in this combined commit may appear large due to this refactoring, but very little code was actually changed.)
Update Go code generator by tracking namespace imports when generating FlatBuffers code.
Update Go code generator by emitting package imports to correctly reference code in other FlatBuffers namespaces.
Create Go test that checks the usage of InParentNamespace objects (as defined in the example schema).
Create Docker test that checks the Go language port.
Fixes google#4883
Fixes google#3927

Individual commits:

* remove "static" from soon-to-be method functions
* move almost all functions into class as methods
* set current namespace and emit package names if needed
* track imported namespaces
* parent namespaces work
* docker test for go ^1.11
* update base image name for go docker test
* remove cerr debugging
* formatting fixes
* re-run generate_code.sh
* explicitly test namespace imports and usage
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.

2 participants