flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

Implement Arrays in Structs for Golang

Open alex1891 opened this issue 1 year ago • 5 comments

based on https://github.com/google/flatbuffers/pull/8036 and added support for object api

This PR implements array support for golang and also supports the object api.

alex1891 avatar Mar 08 '24 09:03 alex1891

@alex1891 the last PR was closed for being stale because it didn't update tests to have arrays with go tested. Hopefully you can update this PR with a test & this can be merged

If you'd like me to take a stab at it let me know & I'll see if I can create a PR to your fork with test

serprex avatar Mar 14 '24 22:03 serprex

@alex1891 the last PR was closed for being stale because it didn't update tests to have arrays with go tested. Hopefully you can update this PR with a test & this can be merged

If you'd like me to take a stab at it let me know & I'll see if I can create a PR to your fork with test

Hi Serprex, that would be great! Because I have no idea how to provide test and it would save me a ton of tiime :)

Let me know if you need some help (e.g. example flatbuffer descriptions)

alex1891 avatar Mar 21 '24 15:03 alex1891

Sorry for dropping this, I lost motivation since I'm not sure flatbuffers developers are interested in external contributions after none of my lua PRs have received any feedback. I had adjusted tests when trying to implement some arrays-in-lua support for #8254 which might show how to add tests for this PR too

Besides that, customer which had me investigating flatbuffers (& uses flatbuffers with go) has decided to go with msgpack instead

serprex avatar Apr 28 '24 11:04 serprex

I added a example fbs and and example output of flatc for object and non-object api.

@aardappel that is what you requested in the old pull request

alex1891 avatar May 14 '24 10:05 alex1891

The newly generated Go files should be included in a go test, that constructs and then reads these new array objects.

@NexusNull @serprex does this otherwise look ok?

aardappel avatar May 17 '24 17:05 aardappel