* 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>
* Dart - change Builder "lowFinish()" to "buffer" and "finish()" to not void return
Aligning the API with other languages, e.g. c++ and allowing custom use-cases to avoid creating a Uint8List
* Dart - change builder.buffer to check that finish() was already called
* Dart - builder - move !finished assertion to _prepare() which is run from all other functions
* Remove ubuntu1604 from presubmit.yml
Ubuntu 16.04 is end-of-life, we're going to remove it from Bazel CI.
If you like you can add testing on `ubuntu2004` platform which we also support.
* Add ubuntu2004 to presubmit.yml
* Fixup CPP documentation's markdown errors
Note that I couldn't get the ~~~{.cpp} method to work,
so I switched to using ```cpp which did work.
* Fixup C++ docs, typo in repeated code example
Co-authored-by: Paul Harris <paulharris@computer.org>
* Make --bfbs-filenames default to location of first schema file.
Make RelativeToProjectRoot always work, applying "../" where needed. This is
needed for backwards compatibility. The first input file may be deeper in some
directory than the other files. Now, there will always be a declaration
file.
* documentation
* clang format
Co-authored-by: Casper Neo <cneo@google.com>
* Add comments for properties
* regenerated test files
* Reverted changes in testfiles generated with generate_code.bat on windows
* fixed formatting in util.cpp because of failed .travis/format_check.sh
* removed the use of tuple
* util.cpp: Fixed format
* idl_gen_json_schema.cpp: removed extra comma in deprecated fields
* Corrected monster_test.schema.json
* idl_gen_json_schema: Inlined Trim function
* Fixed format
* PrepareDescription(): Avoid unnecessary string copy
* fixed formatting
* Improve generated comparisons for tables
Previously, the generated code called std::unique_ptr<>::operator== on
non-scalar members, which would be correct only if the member was null
on both sides. After this CL, comparison is done on the pointed-to
values (including using a default-constructed value if the pointer is
null).
* Don't equate null Tables with all defaults
Also removes the cost of default-constructing tables for comparisons.
* Regenerate code
* fix formatting
* Replace filenames in reflection with filenames+includes.
This is needed for some use cases and may be just useful metadata.
* deser files_included_per_file_
* check project_root
* fix bazel
* git clang format
Co-authored-by: Casper Neo <cneo@google.com>
* Add the file a symbol is declared in to Reflection
If we move a code-generator to depend on Reflection,
it may need to know which file something was declared in
to properly name generated files.
* Doc comments in reflection, and more precise tests
* Add --project-root flag to flatc, normalize declaraion_file to this root
* fix --project-root stuff
* posixpath
* fix scripts
* format
* rename --project-root to --bfbs-filenames
Also, make it optional, rather than defaulting to `./`, if its not
specified, then don't serialize the filenames.
* bfbs generation
* fix some tests
* uncomment a thing
* add to project root directory conditionally
* fix
* git clang format
* Added help description and removed != nullptr
* "
* Remove accidental change to docs
* Remove accidental change to docs
* Pool strings
Co-authored-by: Casper Neo <cneo@google.com>