You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I`m also attaching an example file setup "GoLang issue.zip", just run the "generateFB.py" file on the root folder, it will create a folder named "golang" with the same problem.
Please note that this only happens for Enums, table namespaces are correctly generated and can be referred from other namespaces.
The text was updated successfully, but these errors were encountered:
anthony-ozdemir
changed the title
[Go] Enum name spaces not getting imported
[Go] Enum namespaces not getting imported
Oct 28, 2019
Not familiar with Go importing, but generally it is better for a language to refer to types with a full namespaced path to avoid these kinds of issues, regardless of imports. It may well be that the generator is outputting these types incorrectly.
GoLang issue.zip
Flatbuffer compiler: 1.11 - Windows
It looks like flatc is not generating correct namespaces for enums, I`m constantly getting "undefined: ServerType" error for the setup below:
Example_fbb.fbs:
auth_messages.fbs
common_data.fbs
Generate Go file for "ServerAuthReq.go" doesn`t import Example.Data ServerType enum, hence Golang compiler complains that ServerType cannot be found.
Normally it should generate the following code in "ServerAuthReq.go"
but what we get instead is this:
I`m also attaching an example file setup "GoLang issue.zip", just run the "generateFB.py" file on the root folder, it will create a folder named "golang" with the same problem.
Please note that this only happens for Enums, table namespaces are correctly generated and can be referred from other namespaces.
The text was updated successfully, but these errors were encountered: