* Fix [C#] Object API - Invalid Property Name used in UnPackTo for union fieldhttps://github.com/google/flatbuffers/issues/7750, also fixes invalid Code generated in WriteJson for Unions named Value.
* Test added: new schema union_value_collision.fbs with a Union named Value and a union field named value. The generated C# code now compiles when NetTest.bat. The Code generated with an older flatc.exe didn't compile because of a mismatch of the property name (Value vs. Value_).
* branch was not up-to-date with master
* BASE_OPTS + CPP_OPTS removed and union_value_collision_generated.h deleted
Co-authored-by: Derek Bailey <derekbailey@google.com>
Add the --no-minmax-values flag to prevent flatc from generating C++
enums with MIN and MAX enumerated values that otherwise would be set
to the inclusive lower and upper bound respectively of the enum.
This command-line flag is needed to avoid collisions when an enum that
is being ported to FlatBuffers already has a MIN or MAX enumerated
value.
It is also needed to work around a long-standing problem with
magic_enum that causes magic_enum to not see enumerated values that
are not unique. For example, if FlatBuffers sets MIN = FOO and MAX =
BAR, MIN and FOO share the same underlying value so they are not
unique. The same is true of MAX and BAR. This prevents magic_enum
from converting FOO and BAR to and from strings as well as causing
magic_enum to return a count of enumerated values that is two fewer
than it should be.
Co-authored-by: Paul Serice <paul@serice.net>
* [Kotlin] Only generate nullable return types if the field is not required
* [Kotlin] Fix generated code formatting according to kotlin style guide
Co-authored-by: Derek Bailey <derekbailey@google.com>
Co-authored-by: Paulo Pinheiro <paulovictor.pinheiro@gmail.com>
To make it simple to map between a union field and its union type
field we are adding a pointer to FieldDef to point to each other. For
all other types the pointer will be nullptr.
Co-authored-by: Derek Bailey <derekbailey@google.com>
#7451 caused getFullyQualifiedName to return a name with underscores,
not periods. Because the fully qualified name is a property of
FlatBuffers, not the language being codegen'd for, it should use
periods. Fixes#7564.
Co-authored-by: Derek Bailey <derekbailey@google.com>
* Add clang-tidy, fix some bugpron problems.
* Fix more issues
* Fix some more issues :))
* Minimal pr to just add clang-tidy
Co-authored-by: Derek Bailey <derekbailey@google.com>
* create job to build linux and run unit test on s390x
* update
* update
* update
* update
* update
* print out machine type
* create regression test to build a big endian arch and run unit tests daily
* rename and schedule run on pr merged and on request
* udpate
Co-authored-by: Wen Sun <sunwen@google.com>
Co-authored-by: Derek Bailey <derekbailey@google.com>
* Add Ref.AsStringBytes to flatbuffers.flexbuffers Python API
* Append Bytes to AsStringBytes return value
Co-authored-by: Jared Junyoung Lim <jaredlim@google.com>
* update unit test and generated file to test is extra endianswap can help resolve issue
* remove EndianScalar wrapper from Get method
* remove endianscalar wrapper
* update
* update
* use Array instead
* clang format
* address error
* clang
* update
* manually generate
* Move Nim to completed language
* Add swift link
* address comments
* update unit test
* address comment
* address comment
* regenerate file
* use auto instead of size_t
* use uint32_t instead
* update
* format
* delete extra whitespace
Co-authored-by: Wen Sun <sunwen@google.com>
Co-authored-by: Derek Bailey <derekbailey@google.com>
Without the change build fails on weekly `gcc-13` snapshots as:
In file included from /build/flatbuffers/tests/reflection_test.cpp:1:
tests/reflection_test.h:9:57: error: 'uint8_t' has not been declared
9 | void ReflectionTest(const std::string& tests_data_path, uint8_t *flatbuf, size_t length);
| ^~~~~~~