* [go] always write required types
* support optional scalars in go
* generate optional_scalars and monster_test
* restore original behavior for non-optional scalars
* add tests
* fix for rust build
* Rust: Implement Serialize on generated types
For debugging convenience it is really handy to be able to dump out
types as another format (ie: json). For example, if we are logging a
type to a structured logging system, or even printing it out in a
structured way to the console.
Right now we handle this by shelling out to `flatc` which is not ideal;
by implementing Serialize on the generated types we can use any of the
Serializer-implementing packages for our structured debug output.
* clang-format
* Make the flatbuffers Rust crate only have an optional dependency on the `serde` packages.
* fix warning
* fix rust test build
* Oh yeah this needs to be initialized
* fix toml syntax
* code review feedback
* rebuild test data
* 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
* 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>
* 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>
* Add Build TS to CI jobs
* Add npm compile step
* Fix syntax
* Add required code gen for TS
* Exit on failure
* Make TS code gen identical to test run
* Remove duplicate TS code gen artifacts
* Remove bad gitignore
* Forgot parts of generate_code and make sure same settings for test run
* Don't forget about the bat
* Try and fix flatc args
* Another attempt to fix args
* Fix typo
* Commit up to date code gen
* Another attempt to fix sh/bat
* Move -o param to after -I
* Commit missing code gen file
* Fix grpc code gen and test
* Another grpc code gen fix
* Rework to not use ts folder
* Fix env vars in bat and make less churn
* Move TS code gen to dedicated folder
* Fix transpilation output folder and module paths
* Fixes to code gen
* Include generated js
* Moved ts code gen
* Remove test ts code gen folder
* 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.
* Generate nullable properties in C# object-based API for optional scalars.
tests\generate_code.bat extended to test this.
Ran tests\generate_code.bat
Ran tests\Flatbuffers.Test\NetTest.bat
* %TEST_BASE_FLAGS% replaced with --gen-object-api in generate_code.bat, because only this is part of this PR. Added this same flag to generate_code.sh
* generate_code.bat and generate_code.sh changed to only test c# with object based api.
* 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".