Parsing from proto should keep field ID. (fixes #7645) (#7655)

* Parsing from proto should keep field ID. (fixes #7645)

* Fix failed tests

* Fix windows warning

* Improve attribute generation in proto to fbs

* Check if id is used twice. fix Some clang-format problems

* Test if fake id can solve the test problem

* Validate proto file in proto -> fbs generation.

* Fix error messages

* Ignore id in union

* Add keep proto id for legacy and check gap flag have been added. Reserved id will be checked.

* Add needed flags

* unit tests

* fix fromat problem. fix comments and error messages.

* clear

* More unit tests

* Fix windows build

* Fix include problems

* Fake commit to invoke rebuild

* Fix buzel build

* Fix some issues

* Fix comments, fix return value and sort for android NDK

* Fix return type

* Break down big function

* Place todo

---------

Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
Saman
2023-02-02 03:17:35 +08:00
committed by GitHub
parent 08ebd202e2
commit f838017860
25 changed files with 1154 additions and 177 deletions

View File

@@ -1542,8 +1542,6 @@ int FlatBufferTests(const std::string &tests_data_path) {
FixedLengthArrayJsonTest(tests_data_path, true);
ReflectionTest(tests_data_path, flatbuf.data(), flatbuf.size());
ParseProtoTest(tests_data_path);
ParseProtoTestWithSuffix(tests_data_path);
ParseProtoTestWithIncludes(tests_data_path);
EvolutionTest(tests_data_path);
UnionDeprecationTest(tests_data_path);
UnionVectorTest(tests_data_path);