* added --bfbs-builtins
* update generate_code.bat
* forgot the .
* updated checking scripts
* added bypass for the monster_test.bfbs and arrays_test.bfbs diff issue
* removed check on windows for now
Updates the `files` globs in package.json to include subdirectories in order to also include the flexbuffers directory in the published npm package.
Updates .gitignore to include the tsc-generated JS files.
* Update idl_gen_csharp.cpp
Change csharp generator to use "global::" for it's qualifying_start_ to disambiguate namespaces
* regenerate testing files
regenerate testing files
* Missed TableInC.cs
updated with global prefix
* Remove "global::" from qualifying_start_ for csharp generator
* C# global alias
* Tests and docs for --cs-global-alias
Add tests for --cs-global-alias to demonstrate use case for why it's needed.
Add documentation to Compiler.md
* Add also to help text
Add also to help text
* Test to make sure optional enum is written properly
* Handle optional enum codegen: when cast optional enum add `?`
* Run `tests/generate_code.sh` to generate code from schema
* Fix type casting in case of CreateXXXTypeVector
* Reason why vector's type is not optional
Change the FlatBufferBuilder's methods to accept std::vector parameters
with non-default allocator, by adding another template parameter to
them. This should make using the builder slightly more convenient, as
one won't need to manually pass data() and size() separately.
* Changes to support binary schema file loading and parsing (flatc)
- parser.reset() is also called if binary schema file is given
- code flow changed to not try to load a binary schema as textual schema
* Removed unneeded braces
This allows building FlatBuffers with gcc on macOS:
- avoid linking libc++ when not using clang
- look at compiler first, then OS-specific options
Signed-off-by: Rafal Kapuscik <rkapuscik@antmicro.com>
* [C++] Add mutable version of LookupByKey and test
This adds an overload of LookupByKey to allow lookup in sorted Vectors to
return a mutable instance of the object (or nullptr if not found).
* Fix naming
* Revert "avoiding even more NoSuchMethod exceptions (#6729)"
This reverts commit 6fb2c90d9e.
* Revert "avoiding more NoSuchMethod exceptions (#6671)"
This reverts commit 752c7b576d.
* Revert "avoiding NoSuchMethod exception (#6658)"
This reverts commit 813d3632ec.
* Use Java 8 for Kotlin Linux builds to verify
* flattests_cpp17 doesn't compile with Visual Studio 2017: warning C4100: 'indent': unreferenced formal parameter
stringify_util.h(127): error C2220: warning treated as error - no 'object' file generated
stringify_util.h(127): warning C4100: 'indent': unreferenced formal parameter
stringify_util.h(85): warning C4100: 'indent': unreferenced formal parameter
stringify_util.h(85): warning C4100: 'fbs': unreferenced formal parameter
* [C++] Add GetMutableSizePrefixedRoot() and generate a GetMutableSizePrefixed function
When using the mutable API together with size prefixed buffers these functions should be present.
* clang-format
* Cleanup branch for PR
Revert "flattests_cpp17 doesn't compile with Visual Studio 2017: warning C4100: 'indent': unreferenced formal parameter"
This reverts commit a92055203e.
* Remove dead code in idl_gen_rust
* Use 2space indentation in mod.rs
* use In/DecrementIdentValue in idl_gen_rust
Fix some whitespace too in generated code.
* make default fn 2space ident
* More 2space formatting
* git clang format
* make vs2015 happy
Co-authored-by: Casper Neo <cneo@google.com>
* Handle keywords in C#
C# should handle keywords similarly to other languages by appending an underscore after the keyword.
* Fix clang-format for idl_gen_csharp.cpp
* Fix spacing clang-format issue
* Make CSharp use the command line parameter for file name extension and suffix
* Default file name now has _generated in it,
so we need to rename all the generated test files
tests/namespace_test/NamespaceA/TableInC.* are no
longer used, so these can be deleted
* Fix C# testing projects so that they reference
the new _generated.cs files
* Revert "Fix C# testing projects so that they reference"
This reverts commit cf62b9c5d4.
* Revert "Default file name now has _generated in it,"
This reverts commit 042aa81f10.
* Revert "Make CSharp use the command line parameter for file name extension and suffix"
This reverts commit ba8cd06646.
* Make CSharp use the command line parameter for file name extension and suffix
* Fixup clang tidy
* Fix more clang-tidy
With the changes introduced on #6729, #6671, #6658 it seems that using java
compiler version 8 is no longer possible. We are adjusting our CI build for
Kotlin to use Java 11 as compiler, while still emiting 1.8 bytecode.
The Kotlin CI action is also being breakdown into two: Mac & Linux.
Kotlin mac will test ios & mac builds while Linux will test js and JVM.
This change will improve build times for Kotlin on CI, which is currently
taking long times.
Causes generated code to check for existing pointers in an object (when using the object based api) and use UnPackTo(existingPointer) rather than just using UnPack() to replace the pointer. This is a performance issue when unpacking to existing objects when using large buffer fields (e.g. image frames)
Co-authored-by: RobWauson <robwauson@gmail.com>
* benchmark many vtables
* Rust: Store written_table rev-positions sorted.
The previous implementation was slow if there were too many tables.
Asymototically when inserting the n^th vtable: The old implementation
took O(n) lookup steps and O(1) insertion. The new implementation is
O(log n) lookup and O(n) insertion. This might be improved further by
using a balanced btree.
Benchmarking, create_many_tables is 7.5x faster (on my laptop):
// Simple vector cache
test create_many_tables ... bench: 728,875 ns/iter (+/- 12,279) = 44 MB/s
// Sorted vector cache
test create_many_tables ... bench: 97,843 ns/iter (+/- 4,430) = 334 MB/s
* Fix lints
Co-authored-by: Casper Neo <cneo@google.com>
* Fix C/C++ Create<Type>Direct with sorted vectors
If a struct has a key the vector has to be sorted. To sort the vector
you can't use "const".
* Changes due to code review
* Improve code readability
* Add generate of JSON schema to string to lib
* option indent_step is supported
* Remove unused variables
* Fix break in test
* Fix style to be consistent with rest of the code
* [C#] Fix field name struct name collision (#6744)
* [C#] add union constructor utility.
* add union utility test.
* std::tolower -> CharToLower
* use std::transform instead
* rebase to master. and regenerate test code
* Refactored Rust Generated code into a module directory.
Each symbol will be generated into one file and then
imported into a module. This breaks the "out_dir"
pattern where some users would generate code in their
target/ directory. Also, these objects are best used
in their own module. It will be hard for users to share
their own module structure with flatbuffers namespaces.
There may be solutions to these drawbacks but that should
be discussed. I don't want to overengineer here.
* shadow error
* try fix .bat file
* fix .bat 2
* Restore accidentally deleted files
* Fixed some DONOTSUBMITs and made Rust outdir pattern use symlinks.
* fixed binary files
* git clang format
* make generated onefiles not public and fix .bat
* reduced diff with master in generate_code.sh
* fix shadowed variable
* add object api flags to .bat
* space
* Removed extern crate and extra &
* use statement
* more clippy lints
* format
* Undo extern crate -> use change, it actually matters to our tests
Co-authored-by: Casper Neo <cneo@google.com>