Age | Commit message (Collapse) | Author | Files | Lines |
|
Prior to this commit the default C++ code generator was `c++0x`.
A code generated with `c++0x` code-gen might have a vulnerability (undefined behavior) connected evolution of enums in a schema. This UB could break the backward compatibility if previously generated code casts an unknown enumerator to enum type that knows nothing about future enumerators added to the schema.
The main differences between `c++0x` and `c++11`:
- generated enums use explicitly declared underlying type;
- generated object-API tables don't declare default ctor() explicitly, instead of it default data member initializers are generated.
Please use `flatc --cpp-std c++0x` option for backward compatibility with old compilers.
|
|
This commit unifies parsing of NaN values read
from .fbs and .json files by converting them to unsigned NaN.
|
|
|
|
* Documentation updates for Optional Scalars
* Updated Support
* Reword stuff
* s/NULL/null
Co-authored-by: Casper Neo <cneo@google.com>
|
|
- add a new method ParseJson to minimize failures during fuzzing
- add default (conditional) move-constructor for Parser
- add a new monster_fuzzer
- switch fuzzers to C++17 and `test/cpp17` generated code
|
|
|
|
|
|
* Add --require-explicit-ids to require explicit ids
We just got bit by a well intentioned developer forgetting that field
order by default is the field index. 3 people missed it in review.
I'm looking at ways to make it harder to mess up. We are requesting
that developers explicitly id all fields in tables. Automatic (opt in
for others) enforcement of this will help the effort succeed. This
patch adds a command line flag which lets the user require ids on all
fields in tables.
* Added docs to Compiler.md as well
|
|
* idl_gen_json_schema.cpp: Changed generation of array element types
#6175
* idl_gen_json_schema.cpp: Simplified indent generation as suggested by @vglavnyy
#6175
|
|
|
|
|
|
The lack of any type on the `ret` variable was causing our typescript compiler to complain.
|
|
* Formats files & adds licence
* Revert arrays
* Keeps array indentation as is
* Adds licence to code formatter
* Updates code generators
|
|
|
|
|
|
Co-authored-by: Casper Neo <cneo@google.com>
|
|
|
|
* Remove _POSIX_C_SOURCE and _XOPEN_SOURCE definitions when compiling on OpenBSD
* Only define _POSIX_C_SOURCE and _XOPEN_SOURCE for mingw/cygwin platforms
* Only define POSIX statements for mingw/cygwin/qnx platforms
|
|
* Added missing EndTable() call to VerifyObject()
VerifyObject called VerifyTableStart() but not EndTable(). This made Verifier::VerifyComplexity() increase depth_ with each table, not with the depth of tables.
https://groups.google.com/forum/#!topic/flatbuffers/OpxtW5UFAdg
* Added Check to VerifyAlignment
https://stackoverflow.com/questions/59376308/flatbuffers-verifier-returns-false-without-any-assertion-flatbuffers-debug-veri
* Add GetStringView (Convenience function to get string_view from a String returning an empty string_view on null pointer) like GetString, GetCstring
* flatc should warn, when an attribute is attached more than once.
flatc.exe -b duplicate.fbs
warning: duplicate.fbs(5, 36): warning: attribute already found: priority
duplicate.fbs:
namespace MyGame;
attribute "priority";
table Monster (priority:1, priority:2) {
}
root_type Monster;
* flatc should support --binary --schema with optional scalar fields.
This fixes 'error: Optional scalars are not yet supported in at least one the of the specified programming languages.' when calling flatc.exe --binary --schema with a schema containing optional scalars.
|
|
Versions of rules_go below 0.24 include platforms repository, which are lacking
definitions of os:macos, cpu:arm64 constraints.
This definitions are needed to properly select toolchains in latest
bazel.
|
|
* Union As Accessors for C#
* Changed loop to be compatible with older compilers
* errant change fix
|
|
Resets buffer without deallocating current pointer & Bumps version
|
|
This will return the finished internal buffer data as a span
|
|
Android build was dated, using the Android.mk approach. Current
project configuration on Android encourages the usage of CMake, so we
are updating the android project as an example on how to use either the
Java/Kotlin generate code or the native C++ one.
|
|
Co-authored-by: Casper Neo <cneo@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
Removed grpc tag from swift label set & removes duplicate swift label
|
|
|
|
* [C#] Optional Scalars
* Moved scalar optional check to avoid null enum conversion
|
|
CI is an unrelated timeout.
|
|
* Refactor idl_gen_rust to a ForAllX continuation pattern.
* Removed unneeded SetValue and updated sample rust gencode
* Make Rust flatbuffers print right
* Generated code and removed unnecessary trait constraint
* bumped rust version. Release required
* removed an unwrap in Rust Debug-print unions
* Tested formatting flatbuffers in rust.
* Set float precision in flaky debug-print test
* impl Debug for structs too
Co-authored-by: Casper Neo <cneo@google.com>
|
|
* Adds swift, ts, go, py to labeler bot
* Removes unneeded dir search
|
|
|
|
* Auto Labeler Setup, Just C# for now
* Removed trailer comma as that might caused the issue
* Removed any[].
* Changed .cs glob
|
|
* Updated comments and fixed a fundemental type error.
* bump rust flatbuffers semver
Co-authored-by: Casper Neo <cneo@google.com>
|
|
* optional scalars for ts/js
* removed range based for
* removed range based for
|
|
|
|
Java implementation of optional scalars, following issue #6014.
|
|
Fixes go tests
|
|
definitions (#6204)
|
|
|
|
* Refactor idl_gen_rust to a ForAllX continuation pattern.
* Updated rust sample code
Co-authored-by: Casper Neo <cneo@google.com>
|
|
|
|
* Add test for optional enums in Kotlin
* Rename optional_scalars2.fbs into optional_scalars.fbs
Also updated all references in the project to point to
"optional_scalars.fbs" instead of "optional_scalars2.fbs".
|
|
* Updated SupportsAdvancedUnionFeatures to look out for string
* Mass refactoring to use BASE_TYPE helper functions.
Co-authored-by: Casper Neo <cneo@google.com>
|
|
Co-authored-by: Casper Neo <cneo@google.com>
|