summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-01-31attempt to remove appveyor (#7056)Derek Bailey5-79/+0
2022-01-31Provide a short help text and default in error case (#6992)Derek Bailey3-6/+40
* Provide a short help text and default in error case * clean up short options a bit
2022-01-31Use FindPython3 (#7055)Derek Bailey1-10/+7
2022-01-31remove BIICODEDerek Bailey1-5/+0
2022-01-31Update readme.mdDerek Bailey1-1/+2
Remove travis badge Added Github action badge Add dbaileychess twitter
2022-01-31Fixes a bug where bools arent being nil when marked optional (#7051)mustiikhalil2-3/+3
2022-01-30Implement Serialize on generated rust types (#7022)Max Burke67-1/+5455
* fix for rust build * Rust: Implement Serialize on generated types For debugging convenience it is really handy to be able to dump out types as another format (ie: json). For example, if we are logging a type to a structured logging system, or even printing it out in a structured way to the console. Right now we handle this by shelling out to `flatc` which is not ideal; by implementing Serialize on the generated types we can use any of the Serializer-implementing packages for our structured debug output. * clang-format * Make the flatbuffers Rust crate only have an optional dependency on the `serde` packages. * fix warning * fix rust test build * Oh yeah this needs to be initialized * fix toml syntax * code review feedback * rebuild test data
2022-01-30Cmake 3.16 de-facto minimum version (#7049)Derek Bailey2-31/+804
2022-01-29Convert flatbuffers_version_string to inline function (#7046)Derek Bailey4-38/+6
* Skip conditional for python executable * replaced flatbuffers_version_string with inline function * use const char* instead of string
2022-01-29[C++] Support C++ object copies and moves (#5988)Jean-François Roy7-59/+547
Augment the C++ generator to emit a C++ copy constructor and a by-value copy assignment operator. This is enabled by default when the C++ standard is C++11 or later. These additional functions are only emitted for objects that need it, typically tables containing other tables. These new functions are declared in the object table type and are defined as inline functions after table declarations. When these new functions are declared, a user-defined explicitly-defaulted default constructor and move constructor are also emitted. The copy assignment operator uses the copy-and-swap idiom to provide strong exception safety, at the expense of keeping 2 full table copies in memory temporarily. fixes #5783
2022-01-29[ts] Builder incorrectly serializing empty strings (#7047)Max Burke1-2/+5
* [ts] Builder incorrectly serializing empty strings The builder was returning an offset of zero for empty strings. This is leading to flatbuffers which fail verification in other languages, such as Rust. * tests expect 0 offset for null or undefined strings
2022-01-28Include a SizePrefixed..HasIdentifier for c++. (#6871)Justin T Conroy10-0/+53
* Include a SizePrefixed..HasIdentifier for c++. * Add updated generated code.
2022-01-28Use `${PYTHON_EXECUTABLE}` instead of `py` in cmake (#7042)Derek Bailey2-9/+9
* Emit include for bfbs-gen-embed * Use python3 explicitly * bump min python version to 3.6 * Sort find_package for python * try casting Path to string * cast WindowsPath to string to please CI * stringify the wrong thing * another stringify path
2022-01-27'flattest': Add --test_path option (#7041)Derek Bailey1-9/+27
2022-01-27Added support for clang-cl on windows (CMake) (#7038)MS1-8/+13
* Moved the CMake check for Clang *after* the one for MSVC, as clang-cl matches both Clang and MSVC. * Removed /MP definition - controlled by CMake * Added CPP define for _CRT_SECURE_NO_WARNINGS so clang can see it (it seems it doesnt pick up the pragma in util.cpp)
2022-01-25Fix/cmake build grpc (#7028)LouisP1-3/+23
* BuildFlatbuffers.cmake: add verbose on build * BuildFlatbuffers.cmake: properly add *.fb.* files with --grpc argument When "--grpc" argument is provided as an extra flag, resulting grpc files should be added as part of the interface library. This prevent adding .fb.cc files manually to the build. V2: fix dependency on grpc files
2022-01-25Add FlatBuffers::FlatBuffers interface, needed for FetchContent_Declare (#7023)BogDan Vatra1-0/+8
2022-01-25Fix comment with line orders - Rust should be last. (#7037)Jon Simantov1-1/+1
Fix for #6867.
2022-01-25Use actions/checkout@v2, which fixes security vulnerability. (#7036)Jon Simantov1-16/+16
Fix for issue #6999.
2022-01-25Add --warnings-as-errors to flatc compiler. (#7034)Jon Simantov4-1/+34
* Add --warnings-as-errors to flatc compiler. With this option set, flatc will return an error on parsing if any warnings occurred. * Add unit test for opts.warnings_as_errors. * Change explicit option setting to default.
2022-01-25Emit include for bfbs-gen-embed (#7031)Derek Bailey2-0/+5
2022-01-25Upgraded GRPC version to 1.42.0 (#7033)Derek Bailey1-1/+1
2022-01-20chore: dart 2.0.5 release changes (#6983)Ivan Dlugos3-7/+13
2022-01-20rust: Allow for usage in no_std environment (#6989)Marcin Witkowski14-40/+70
2022-01-14Make flatbuffer builder deterministic (#6993)Danila Kutenin1-3/+3
2022-01-14Added verifier alignment checking to table fields (#7018)Wouter van Oortmerssen18-248/+273
2022-01-14BuildFlatBuffers.cmake: fix arguments not passed properly to flatc (#7013)LouisP1-1/+1
Fix regression introduced by commit e9d45324012ed04af97cbe99bab0e6afe475e95d
2022-01-13Add initial C# vector of unions support to the documentation. (#6880)Richard A Hofer1-0/+119
* Add initial C# vector of unions support to the documentation. * Add notes about missing documentation for vector of unions.
2022-01-06[TS/JS] BigInt implementation (#6998)Alex E22-256/+225
* BigInt implementation * Unit test reading long from existing bytebuffer * Code review
2021-12-23Avoid implicit conversion from float to double. (#7003)Advait Jain1-1/+1
https://github.com/tensorflow/tflite-micro makes use of flatbuffers with a variety of DSP toolchains. Without the change from this PR, we can get a double-promotion warning with some of these DSP toolchains: ``` flatbuffers/include/flatbuffers/util.h:104:11: error: implicit conversion increases floating-point precision: 'std::numeric_limits<float>::_Ty' (aka 'float') to 'double' [-Werror,-Wdouble-promotion] T eps = std::numeric_limits<float>::epsilon(); ~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
2021-12-22Rearrange #include directives to pass to compilation with a particular DSP ↵Shlomi Regev1-1/+2
toolchain (#7000) iomanip isn't available for our DSP. Luckily, we compile with FLATBUFFERS_PREFER_PRINTF, so moved the #include directive there. ctype.h has to be included explicilty for tolower() and toupper().
2021-12-18Reverting grpc generated file suffix (#6995)Panagiotis Gourgaris3-14/+10
* Reverting grpc generated file suffix * - Setting the greeter sample as it was - Reverting the include of the generated message in grpc.cc file
2021-12-15Disable parsing of nested_flatbuffers as bytes by defaultWouter van Oortmerssen4-1/+17
Parsing as bytes produces buffers that are unsafe to access unless passed thru a verifier, whereas users could reasonably assume that any JSON parsed without errors is safe to access. Users that still have legacy JSON files with such bytes in it will get a helpful error point them to the option to turn on to have it work again.
2021-12-14Enable OSS-Fuzz on CIWouter van Oortmerssen1-0/+24
2021-12-14Updated FlexBuffers fuzzerWouter van Oortmerssen1-1/+3
2021-12-14Added alignment checking to FlexBuffers verifierWouter van Oortmerssen1-0/+10
2021-12-14FlexBuffers verifier additionally checks for nestingWouter van Oortmerssen1-3/+19
2021-12-14Made FlexBuffers reuse tracker track typesWouter van Oortmerssen4-42/+54
2021-12-13Prevent shadow with _{{FIELD_NAME}} (#6991)Derek Bailey4-37/+37
2021-12-13FlexBuffers fuzzer fixesWouter van Oortmerssen1-30/+26
- String dedup wasn't handling internal nulls correctly. - Verifier wasn't recursing for certain types. - Vector self-reference could create inf recursion.
2021-12-13Refractor Flatc Options (#6987)Derek Bailey3-183/+312
* Moved error/warnings to bottom of std error * Refactor flatc options * pass program name to flatc * extra -- in one option * merge of upstream
2021-12-13[CMake] Add option for disable universal on OSX (#6990)Vadim-Valdis Yudaev1-1/+7
See https://github.com/google/flatbuffers/issues/6988
2021-12-13Validate C# json/object-api options (#6985)Derek Bailey3-3/+12
2021-12-13Add .NET test to github workflows (#6982)Derek Bailey3-15/+30
2021-12-10[CMake]: Fix version in pkgconfig file (#6986)Biswapriyo Nath1-1/+1
This change checks if the current source directory is a git repository. If this is not checked the git command picks the commit hash from parent directory. e.g. when tarball is extracted in a packaging repository.
2021-12-10re-enabled FlexBuffer JSON in fuzzerWouter van Oortmerssen1-3/+0
2021-12-10Verifier for FlexBuffers (#6977)Wouter van Oortmerssen11-6/+300
* Verifier for FlexBuffers * Verifier improvements & fuzzer
2021-12-10[CMake]: Fix python command for mingw environment (#6984)Biswapriyo Nath1-2/+2
In mingw build environment, this fixes the build error: 'py' is not recognized as an internal or external command The 'py' launcher is available for MSVC python only. More https://docs.python.org/3/using/windows.html#from-the-command-line
2021-12-09Enable --gen-onefile in Python (#6953)lu-wang-g15-2268/+5042
* Enable --gen-onefile in Python Made it possible to generate all python code in one file. Modified py_test.py so that it can switch between the multi-file code and the one-file code. Updated PythonTest.sh and py_test.py so that the multi-file code and the one-file code can be tested based on the same test code. * Sync with google/flatbuffers * Add --gen-onefile to generate_code.py
2021-12-09Make idl_parser deterministic (#6976)Danila Kutenin1-0/+6
* Make idl_parser deterministic Some golden tests even exercise this [logic](https://github.com/google/flatbuffers/blob/df2df21ec1be2468106fed10c1533eacc1cf0d2e/tests/prototest/test.golden#L8). Let's make the parser fully stable not depending on the implementation of std::sort * Retry the ci