Age | Commit message (Collapse) | Author | Files | Lines |
|
If flatbuffers is built in C++11 mode, but there is a recent version of
absl which requires C++14, the build will fail.
Cf https://github.com/MapServer/MapServer/issues/6822 for the use case
that triggered this.
|
|
|
|
Co-authored-by: chrismue <chrismue.gitlab@gmail.com>
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
* AnnotatedBinaryTextGen switch to ofstream instead of building giant string
* Add --annotate-sparse-vectors to reduce AFB size
|
|
* Simplify and fix TypeScript compilation output
* Revert deps upgrade
|
|
|
|
|
|
|
|
|
|
* 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>
|
|
* Refactor BfbsGenerator to use CodeGenerator interface
* Update
* Refactor bfbs generator
* Refactor bfbs generator for lua and nim. Remove old code that use Generator
interface.
* Update import
* Update CMakeLists
* Update BUILD file
* Update BUILD file for src
* Remove from Android CMakeLists and add error message
* Update
* Add generate root file function to Code Generator interface
* Update
* Update
* Minor format fix
|
|
The current detection method fails on GCC 12.2 with -std=c++20 because
the __cpp_lib_span macro is undefined.
As per https://en.cppreference.com/w/cpp/utility/feature_test ,
__cpp_lib_span requires including either <version> or <span>.
Since both these headers were added in C++20, checking for C++20 is
sufficient (and simpler than using the library feature-test macro).
Signed-off-by: Bernie Innocenti <bernie@codewiz.org>
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
* Update PackageDebian.cmake
* Rename LICENSE.txt to LICENSE
* Update readme.md
---------
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
|
|
* Update usage string formation
* Rework help message to use code generator interface
* update
* refactor
|
|
* Swift should use swift generator
* Swift should use swift generator
Co-authored-by: Mo (Khanh) Nguyen <khhn@google.com>
|
|
* Clean up extra white spaces
* update
Co-authored-by: Wen Sun <sunwen@google.com>
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
* Refactor to use CodeGenerator interface.
- Move code to its own header file to be included in flatc_main.cpp
- Refactor code to use CodeGenerator interface for all languages
* Format all files
* remove lua code generator since it doesn't support bfbs generator
* Update CMakeLists file with new idl_gen_*.cpp and idl_gen_*.h files
* Add idl_gen_swift header file
* Add idl_gen_swift header file and update bazel file
* Remove CodeGenerator interface for idl_gen_text.*. Remove comments and extern declaration
* Reorder header and implementation files in CMakeLists.txt
* Add idl_gen_* header files to implementation files
* Update CMakeLists and remove unused import
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
* add unit tests for support struct as key
* make changes to parser and add helper function to generate comparator for struct
* implement
* add more unit tests
* format
* just a test
* test done
* rerun generator
* restore build file
* address comment
* format
* rebase
* rebase
* add more unit tests
* rerun generator
* address some comments
* address comment
* update
* format
* address comment
Co-authored-by: Wen Sun <sunwen@google.com>
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
|
|
build (#7510)
* [TS/JS] Entry point per namespace
* Fix handling of outputpath and array_test
* Attempt to fix generate_code
* Fix cwd for ts in generate_code
* Attempt to fixup bazel and some docs
* Add --ts-flat-files to bazel build to get bundle
* Move to DEFAULT_FLATC_TS_ARGS
* Attempt to add esbuild
* Attempt to use npm instead
* Remove futile attempt to add esbuild
* Attempt to as bazel esbuild
* Shuffle
* Upgrade bazel deps
* Revert failed attempts to get bazel working
* Ignore flatc tests for now
* Add esbuild dependency
* `package.json` Include esbuild
* `WORKSPACE` Add fetching esbuild binary
* Update WORKSPACE
* Unfreeze Lockfile
* Update WORKSPACE
* Update BUILD.bazel
* Rework to suggest instead of running external bundler
* Add esbuild generation to test script
* Prelim bundle test
* Run test JavaScriptTest from flatbuffers 1.x
* Deps upgrade
* Clang format fix
* Revert bazel changes
* Fix newline
* Generate with type declarations
* Handle "empty" root namespace
* Adjust tests for typescript_keywords.ts
* Separate test procedure for old node resolution module output
* Fix rel path for root level re-exports
* Bazel support for esbuild-based flatc
Unfortunately, we lose typing information because the new esbuild method
of generating single files does not generate type information.
The method used here is a bit hack-ish because it relies on parsing the
console output of flatc to figure out what to do.
* Try to fix bazel build for when node isn't present on host
* Auto formatting fixes
* Fix missing generated code
Co-authored-by: Derek Bailey <derekbailey@google.com>
Co-authored-by: James Kuszmaul <jabukuszmaul+collab@gmail.com>
|
|
* Flatbuffers Version 23.1.20
* Fix warnings
* Fix warnings
|
|
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
|
|
* Fix binary output different in different platform, due to the nan serialization
* Add check generated code on windows ci
* Remove resdundant script
* Fix eof, and check script
* Minor bug in gen code script
* Fix windows script, remove redundant scripts
* Undelete redundante codes
* Fix github action
* Ignore eof generate grpc
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
Comparing short strings, small integers, and Booleans by identity
(memory address) can work due to optimizations in the Python
interpreter, but it is neither formally correct nor reliable. Use
equality comparisons instead.
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
It is deprecated in favour of importlib and slated for removal in Python
3.12. Since the return value of imp.find_module('numpy') is unused, the
only effect of calling this function is to raise an ImportError when
numpy is not available; importing numpy directly is already sufficient
to do this.
The imp package is still used in python/flatbuffers/compat.py, but only
on Python 2, where it is not deprecated and will not be removed.
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
vtable (#7739) (#7752)
* [TS]: Fix vtable creation for consecutive required fileds (#7739)
* handle feedback
* comment the schema
* comment change in builder.ts
* [TS]: builder, Fix requiredField()
Verifty that the field is present in the vtable.
* restore monsterdata binary file
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
* In Python tests, use host-endian-independent dtypes
* Fix host endianness dependence in Python flexbuffers
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
* [Kotlin] Control the generation of reflection with --reflect-names.
Tested:
```
$ cmake -G "Unix Makefiles" && make && ./tests/flatc/main.py
...
KotlinTests.EnumValAttributes
[PASSED]
KotlinTests.EnumValAttributes_ReflectNames
[PASSED]
KotlinTests: 2 of 2 passsed
...
35 of 35 tests passed
```
* [Kotlin] Fix SampleBinary by converting Byte to UByte for ubyte fields.
* [Kotlin] Annotate all generated classes with kotlin.ExperimentalUnsignedTypes.
|
|
Since flatbuffers is using calendar versioning and does not provide
any ABI stability guarantees, use the complete version as SOVERSION
for the shared library rather than just the major component. This
prevents breaking reverse dependencies on incompatible upgrades.
Fixes #7759
|
|
|
|
|
|
* Refactor FlatC to receive `FlatCOptions`
* switch to c++11 unique_ptr
|
|
|
|
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
* 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>
|
|
|
|
Formats the swift project
Update Sample files
Update docc documentation
Updates swift docs in the website
Updates code for Wasm
|
|
* [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>
|
|
* Fix operator==() generated for field of fixed sized array
* Compare address
* noexcept
* Grammer
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
Tested:
```
$ cmake -G "Unix Makefiles" && make && ./flattests
...
[ 99%] Linking CXX executable flatsamplebinary
[100%] Built target flatsamplebinary
ALL TESTS PASSED
```
Co-authored-by: Derek Bailey <derekbailey@google.com>
|
|
Updated the front readme doc about the non-semver versioning so that the rationale is more apparent to users.
|
|
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>
|
|
|
|
|