google / flatbuffers

FlatBuffers: Memory Efficient Serialization Library
https://flatbuffers.dev/
Apache License 2.0
23.16k stars 3.23k forks source link

Implement Arrays in Structs for Golang #8250

Open alex1891 opened 6 months ago

alex1891 commented 6 months ago

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.

serprex commented 6 months ago

@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

alex1891 commented 6 months ago

@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)

serprex commented 5 months ago

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

alex1891 commented 4 months ago

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

aardappel commented 4 months ago

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?