Age | Commit message (Collapse) | Author | Files | Lines |
|
Upgrade swift grpc to alpha 24
|
|
Limit the length of the fuzzer input to 16384 characters to prevent timeout
in JSON parser (Vector of tables with key).
Related oss-fuzz issues:
- 5742497110294528
|
|
The code was ported based (#6387)
on the current Java Implementation.
The code dependencies related to JVM were removed and the project is able to target all available platforms.
The only requirement to implement to fully support a target is to implement functions described in `ByteArray.kt`.
Right now the code support JVM and native targets. JS port still missing, but just be trivial to introduce.
Currently, only the `jvm` and `macosX64` targets are enabled until we figure out how to enable tests on all
platforms on CI.
A submodule called "benchmark" is also introduced. It contains a series
of benchmarks comparing Java and Kotlin implementations of FlexBuffers and the UTF8 API.
Finally, this commit does not contain the scripts necessary to publish the artifacts. This will
be introduced at a later stage once the team has an agreement on how to rollout Kotlin releases.
|
|
* Remove a lot of redundancy from the Python generated code.
Update tutorial to reflect new Python generated code.
* Add aliases for newly deprecated Python generated methods.
This should help with backwards compatibility.
* Fix incorrect names in deprecated comments.
|
|
* remove inner attributes
* Added test for outdir in Rust
* add bin/outdir
* Moved outdir test to its own package and only run it if flatc is available
Co-authored-by: Casper Neo <cneo@google.com>
|
|
* Add codegen test for namespaced unions
* [Rust] Handle cross-namespace union use
* [Rust] Test namespace handling
* [Rust] Drop trailing whitespace in codegen
* [Rust] Set flags in generate_code.bat to match .sh
* [C#] Add additional namespace test file
|
|
* Define presence.
* Migrate to IsRequired and IsOptional methods
* moved stuff around
* Removed optional and required bools from FieldDef
* change assert to return error
* Fix tests.cpp
* MakeFieldPresence helper
* fmt
* old c++ compatibility stuff
Co-authored-by: Casper Neo <cneo@google.com>
|
|
* Apply NativeName before WrapInNameSpace in idl_gen_cpp.cpp
* remove actual_type argument from GetUnionElement -- it's always true
* Merge GetUnionElement's native_type and wrap_native argument -- they always have the same value.
* Use convenience method WrapNativeNameInNameSpace
* Remove wrap_namespace argument from GetUnionElement
* Move declaration closer to first use.
|
|
|
|
* inital commit of rust object api
* Required fields support.
* clang fallthrough
* Fix unused variables
* just don't fall through
* remove comment
* s/panic/unreachable
* Tests for object API
* Added defaults
* deleted unintentionally added files and updated .bat file
* fix bat file
* clang format
* Cargo clippy checks
* remove commented out code
* clippy allows
* Remove matches! macro since we're not yet at Rust v1.42
* install clippy in RustTest.sh
* move line
Co-authored-by: Casper Neo <cneo@google.com>
|
|
I'm also clarifying that while elements are not deduplicated, vectors
may contain more than one offset to the same value.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
|
|
I mention that a common practice is to wrap the scalar value in a table
or a struct.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
|
|
This is an attempt to explain how FlatBuffers encodes union types as an
extra section in the "FlatBuffers internals" document.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
|
|
|
|
Protocol Buffers v3 supports the `oneof` operator:
https://developers.google.com/protocol-buffers/docs/proto3#oneof
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
|
|
* TS/ES6 modules spike iteration 1
* Initial modularized dasherized output
* Remove obsoleted parts and namespace wrapping
* Use _flatbuffers_ prefix
* First part of imports logic
* Second part of imports logic
* Fix TS/JS code removal mixup
* Alias imported symbols if same name from different namespaces and some fixes
* Use star import for bare imports
* Fix messed up string concat
* var to const and remove not needed semi
* Remove some cases of ns prefixing
* Add missing space
* Cleanups
* Completed initial import tracking logic
* Compilable output
* Adjust TypeScriptTest and dependents to work
* Use local flatbuffers package for tests
* Refactor away use of any
* Remove obsolete imported_fileset and reexport_map
* Still need any and fix JavaScriptTest.sh
* Fix test runs out of the box
* Temp add generated files
* TypeScriptTest replaces JavaScriptTest and cleanups
* Also remove reference to JavaScriptTest in TestAll.sh
* Remove old generated ts/js files
* Remove use of --js in generate_code scripts
* idl_gen_js_ts to idl_gen_ts and removal of js gen
* Remove obsoleted options
* Fix obsolete ts test detection
* Tweak ts compilation be as strict as possible
* Remove jsdoc type annotation generation
* Generated test ts files
* Fix search and replace messup
* Regenerated ts test output
* Use CharToLower
* Use normal for loop
* Rework namespacedir
* Revert "Rework namespacedir"
This reverts commit 6f4eb0104ceeb86011bb076ebca901138c48e068.
* Revert "Use normal for loop"
This reverts commit 676b2135bfaa1853dfbb06c92b5c16a0d81bb13a.
* Revert "Use CharToLower"
This reverts commit 2d08648d0d72d0af201fad80d54cdc76412b35e9.
* Again do rework but correct
* Avoid runtime cast
* Fix test runs
* Also add npm install to get tsc
* Bump node test versions
* for range to std for loop
* Clang format
* Missed one clang format
* Move accessor to later
* Attempt to make windows version of TypeScriptTest
* Want to see the output
* Try to get newer node at appveyor
* Style changes
|
|
Added the new method LookupTableByName for searching symbols in parent namespaces.
This method speedup (x50 or greater) symbol resolution (enum or struct) in parent namespaces.
The speedup was measured without `table.empty()` guard condition.
This method should suppress fuzzer timeout issue without artificial limits for nested namespaces (https://oss-fuzz.com/testcase-detail/6244168439169024).
Additionally, this commit speedup (x5) the GetFullyQualifiedName method by removing unnecessary temporary std::string object.
|
|
* [codegen] Search for includes in the directory containg the current file
This matches the behavior of a C preprocessor, see:
https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html
* Skip FileExists() when file is guaranteed to not exist
* end comment with period to match others
|
|
Co-authored-by: Casper Neo <cneo@google.com>
|
|
* Rename idl_gen_js_ts to idl_gen_ts to preserve history
* Change build related files
|
|
* Unset FieldDef.optional if its key
* removed StringKey table, just removed an extra "required, key"
* removed extra newline
Co-authored-by: Casper Neo <cneo@google.com>
|
|
This commit should fix issue 29374 in oss-fuzz.
|
|
* Fix miri problems by assuming alignment is 1 in rust
* Removed is_aligned fn from rust verifier.
* Add back is_aligned, but make it w.r.t. buffer[0]
* touch unused variable
* touch unused variable
* +nightly
* Move Rust miri testing into its own docker
* fix bash
* missing one endian conversion
* fix endianness2
* format stuff
Co-authored-by: Casper Neo <cneo@google.com>
|
|
Specifically, this lets the googlemock container matchers work with a
flatbuffers::Vector.
https://github.com/google/googletest/blob/master/googlemock/docs/cheat_sheet.md#container-matchers
|
|
For some reason, this fuzzer failed to load the binary schema file
when run on the `/clusterfuzz` server.
Issue: https://oss-fuzz.com/testcase-detail/6215075358703616
This issue doesn't reproduce locally with the latest oss-fuzz docker image.
|
|
(#6389)
* Fix up scripts, fix generated enum value for strong mode, regenerate files
* missing files
* GH action
* remove action
|
|
* tests/GoTest.sh: Fix flags.Parse location to work on new go SDKs.
Calling flags.Parse() within init() races with other packages which register
flags in their init(), and in particular with the testing package itself. It is
more reliable to call flags.Parse() from a TestMain implementation.
See https://github.com/golang/go/issues/31859,
https://github.com/golang/go/issues/33869.
* .github: Enable build-go action in build.yaml workflow.
|
|
|
|
|
|
This commit fixes handling of default and NULL `key` fields in `Parser::ParseVector` (#5928).
The JSON generator updated. It outputs `key` fields even if the `--force-defaults` option is inactive.
Additional test cases for `key` added.
|
|
|
|
* Implements type promotion for Java enum as suggested in #3890, #5111, #6369
* After generate_code.sh
|
|
Removing this workflow as it isn't used.
|
|
It errors with "Fatal error: Uncaught exception 'InvalidArgumentException' with message 'bad number for type byte.. in /home/runner/work/flatbuffers/flatbuffers/php/ByteBuffer.php:490" which I can't reproduce locally, and trying to fix it on CI runs into PHP's insane handling of numbers vs strings.
|
|
* semver-compatible deprecations
* removed unneeded lifetimes (+ clippy warnings)
* silenced too many args warning
|
|
|
|
* [idl_parser] Improve stack overflow protection
Add stack overflow protection for Flexbuffer and nested Flatbuffer parsers.
Replaces the `Recurse()` method by the new ParseDepthGuard RAII class.
* Remove move operator from Parser.
It was wrong decision to add move ctor and assignment into Parser class.
These operators will make it extremely difficult to add constant or reference fields in the future.
* Remove ';' from definition of FLATBUFFERS_DELETE_FUNC
* Format code
* Make this PR compatible with MSVC2010 (it doesn't support inherited ctor)
|
|
* [idl_parser] Check the range of explicitly set field's id value
The explicitly set `id` attribute should be a non-negative value of the `voffset_t` type.
* Format FieldIdentifierTest()
|
|
* Generate code to encode and decode nested flatbuffers in Python.
* Delete accidental trailing whitespace.
* Fully delete trailing whitespace.
|
|
* Adds shared strings and tests for shared strings
* Adds resets on string_map
* Moved shared strings to use vector instead of hashmap
* Addresses all the issues
* Resolves some comments
|
|
|
|
* include_prefix support for rust
* include_prefix support for java
* formatting fixes
* Revert "include_prefix support for java"
* style fix
|
|
* Rebuild the way swift handles structs from scratch
* Updates docs, and sample binary
* Replaces InMemory to Mutable
* Migrates docs from inmemory
* use inline for some functions
* Renamed Mutable objects
* Updates documentation
|
|
* Fix typos in usage/comments; Make rust generator respect to --filename-suffix
* run clang format
|
|
The infinityf symbol is causing a conflict when building for cygwin. In
the cygwin math.h header there is also a symbol called infinityf. So
this patch is needed to be able to build the flatbuffer tests in a
cygwin environment.
|
|
* Add vectorNumElements attribute to Builder for simpler vector creation.
This adds a default to EndVector which should simplify its use.
* Update tutorial to reflect new default arg in Python EndVector.
* Remove optional argument to Python EndVector.
* Add generated files.
* Unset Builder.vectorNumElems when not in use.
|
|
* Adds formatters CI
Adds Error message & setup formatting like cpp
Adds Swift
Adds typescript
Adds python
tests yarn
Adds format.md
* Removes unneeded scripts + moves install script to install phase
* Adds format.md content
* Adds cpp to the formatter.md and fixes ci
* Adds cpp to formatter ci
|
|
apparently the default xcodebuild path of ./build clashes with the BUILD file present (case insensitive file system?)
|
|
(without -gen-mutable) (#6273)
* 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.
|
|
|