* disable reproducible build warning due to date/time macros
* wrapped GCC pragmas in #ifdef _GNUC_
* removed __DATE__ and __TIME__ macros from flatc.cpp
* Add flatbuffer_cc library support
* Update flags so all the tests pass
Tests now all pass!
* Modify the tests to use the generated code
This should be a simple serialize/deserialize test of the new generated
code to make sure the bazel rules are doing something sane.
* Use generated monster_test.fb in testing/test.cpp
cmake drops it's generated code in tests/monster_test_generated.h
Instead of checking that in, let's generate it with bazel.
* Make grpc tests depend on monster_test_generated.h
* Remove redundant cmake dependency
This should address @aardappel's feedback.
* Run flatc for Android as well
This will fix the last travis.ci failure
* Add generated output folder and fix flags
* Move flatbuffers_header_build_rules to the library that uses it
* Use --cpp-ptr-type to fix android
Android was the only target using the STL emulation layer. It needed
the --cpp-ptr-type flatbuffers::unique_ptr flag to work. Add it!
* Roll back changes to use autogenerated monster_test_generated.
Flip tests/test.cpp to use the autogenerated file as well.
This runs a script in TravisCI that executes a bunch of small Docker image
scripts to test the language ports in isolated environments. This allows us to
test multiple language versions with little additional complexity.
Covers:
+ Java OpenJDK 10.0.2
+ Java OpenJDK 11.0.1
+ Node 10.13.0
+ Node 11.2.0
+ Python CPython 2.7.15
+ Python CPython 3.7.1
+ Rust 1.30.1
Multiple calls of e.g. CreateString inside a call to a CreateTable
could cause those strings to end up in different locations in the
wire format, since order or argument evaluation is undefined.
This is allowed by the FlatBuffer format, but it is not helpful,
especially when debugging the contents of binaries, or comparing
against a "golden" binary for tests etc.
Now making sure that all the CreateTableDirect calls first serialize
sub strings/vectors before calling CreateTable.
Also made similar changes to the serialization of "binary schemas".
Change-Id: I5747c4038b37a0d400aca2bc592bec751cf5c172
* Make the Parser independent from the global C-locale
* Set a specific test locale using the environment variable FLATBUFFERS_TEST_LOCALE
* Remove redundant static qualifiers
Tests for third_party code are run out of the main workspace. This
isn't an issue when the main workspace is the
com_github_google_flatbuffers workspace, but is an issue when you are
running the tests from another repository.
To reproduce, use "git_repository" to add flatbuffers to a project and
then run:
bazel test @com_github_google_flatbuffers//:flatbuffers_test
* FlexBuffer to JSON convertor for typed and fixedTypedvectors
* moving the common implementation to template
* signed unsigned comparison fix
* fix a formatting ({
* changing logic to append comma in vector of elements in json
* keep include path
* add option --keep-prefix for js
* format contribution (format whole files before merge!)
* revert util.h : IsAbsPath ...
* JS Generator: only support relatives paths (keep it as it was)
Some generic C++ and Rust code is not generated when unions use type
aliases because of potential ambiguity. Actually check for this
ambiguity and only disable offending code only if it is found.
This is because they are incompatible with C++ and possibly other
languages that make them minimum size 1 (to make sure multiple
such objects don't reside at the same address). Forcing them to size
1 was also not practical, as that is requires updating the logic
of a lot of implementations and thus possibly backwards incompatible.
More here: https://github.com/google/flatbuffers/issues/4122
Change-Id: I2bfdc8597b7cfd2235bb4074bb2ae06f81f8e57d
* Add '-fsanitize' optional flags to flattests and flatc targets
Control: -DFLATBUFFERS_CODE_SANITIZE=(ON | OFF | "=memory,undefined")
Travis-CI: building with -DFLATBUFFERS_CODE_SANITIZE=ON
* Fix -pie flag
* Cleanup
Give the vtable offset enum inside each table the name
"FlatBuffersVTableOffset" and base type voffset_t so it can be used as a
dependent type in IsFieldPresent. This makes that function slightly
safer since it prevents calling it with arbitrary, non-table types.
Now, the only way to use IsFieldPresent incorrectly is to create your
own type which does not inherit from flatbuffers::Table but has a
dependent voffset convertible type "FlatBuffersVTableOffset".
* call reflection code generation from tests
This simplifies instructions to contributors so they don't forget to update
reflection code.
* add error handling to generate_code scripts
Let them propagate their errors instead of swallowing them so they show
up when called in CI.
* apply editorconfig to shell scripts
* use ordered map in dart codegen
Using an unordered map in the codegen can lead to spurious diffs in the
generated dart code.
* add CI check for generate_code being run
* update reflection_generated.h
* disable diff-check for monster_test.bfbs
Work around #5008.
* forbid enum values that are out of range
Enum values that are out of range can lead to generated C++ code that does
not compile. Also forbid boolean enums.
* update enum and union documentation slightly
* Efficient conversion of FlatBufferBuilder to grpc::MessageBuilder
* Added a variety of tests to validate correctness of the MessageBuilder move operations.
Disable MessageBuilder half-n-half tests on MacOS.
* Fix failing Android build
* Generalized the MessageBuilder move constructor to accept a deallocator
std::function makes code harder to debug because it requires stepping
through a separate destructor and call operator. It's use unnecessary
in the Parser since the functions taking functors are private and are
only used within idl_parser.cpp. Therefore the definitions can stay in
idl_parser.cpp as well. Only care must be taken that the definitions
appear before use but that's already true and all compilers will
complain equally if it get's violated. This change might also improve
performance since it might allow inlining where it wasn't possible
before but I haven't measured that.
* Refactoring of numbers parser
More accurate parse of float and double.
Hexadecimal floats.
Check "out-of-range" of uint64 fields.
Check correctness of default values and metadata.
* Remove locale-independent code strtod/strtof from PR #4948.
* small optimization
* Add is_(ascii) functions
* is_ascii cleanup
* Fix format conversation
* Refine number parser
* Make code compatible with Android build
* Remove unnecessary suppression of warning C4127