* [C++] Rename template parameter U in make_span of stl_emulation.h
CPPRESTSDK defines a U macro therefore, calls to U() are problematic.
Rename U to W to avoid conflict.
* [C++] Make typenames of span_convertable and make_span more expressive
Co-authored-by: Derek Bailey <derekbailey@google.com>
* Vector of Tables equality
* support nullptr and fix for not being able to use auto in lambda
* use different std::equal overload
* use flatbuffers::unique_ptr
* go back to auto and clang-format fix
Change config.escape_keywords to AfterConvertingCase.
It avoids unecessay escaping since the generated native
structs have fields starting with a uppercase letter
and Go's keywords start with lowercase letters.
Co-authored-by: Derek Bailey <derekbailey@google.com>
* [golang] Add support for text parsing with json struct tags
Add struct tags to Go native structs generated when object API is used.
This allows to use the same JSON file as for C++ text
parsing(i.e. snake_case vs CamelCase) and thus enabling text parsing
for Go(when using object API).
* [golang] Add test for text parsing
Added small test to check and demonstrate text parsing in Go.
Also, ran clang-format on cpp file changes.
* grpc/compiler: Respect filename suffix and extension during code generation
grpc compiler is not respecting filename suffix and extension passed to
flatc CLI. This causes compiler to spit out incorrect code, which then
cannot be compiled without modification.
Following patch fixes the problem.
Note, I ended up removing some code introduced #6954 ("Have grpc include
file with correct filename-suffix given to flatc") in favour of keeping
sanity of the generator code.
Signed-off-by: Aman Priyadarshi <aman.eureka@gmail.com>
* tests: Add filename-suffix and filename-ext test files
* Test 1: Filename extension changed to "hpp".
* Test 2: Filename suffix changed to "_suffix".
* Test 3: Filename extension changed to "hpp" and suffix changed to "_suffix"
Signed-off-by: Aman Priyadarshi <aman.eureka@gmail.com>
* CMake find_package fixes (#7323)
Rename FlatbuffersConfigVersion.cmake to match CMake project name
* CMake find_package fixes (#7323)
Rename FlatBuffersTargets to match CMake project name
* grpc/compiler: Respect filename suffix and extension during code generation
grpc compiler is not respecting filename suffix and extension passed to
flatc CLI. This causes compiler to spit out incorrect code, which then
cannot be compiled without modification.
Following patch fixes the problem.
Note, I ended up removing some code introduced #6954 ("Have grpc include
file with correct filename-suffix given to flatc") in favour of keeping
sanity of the generator code.
Signed-off-by: Aman Priyadarshi <aman.eureka@gmail.com>
* tests: Add filename-suffix and filename-ext test files
* Test 1: Filename extension changed to "hpp".
* Test 2: Filename suffix changed to "_suffix".
* Test 3: Filename extension changed to "hpp" and suffix changed to "_suffix"
Signed-off-by: Aman Priyadarshi <aman.eureka@gmail.com>
Introduce a MSVC_LIKE variable in the CMake scripts, set that variable to
true only if the compiler is either MSVC or tries to emulate the MSVC
command line, and test that variable when setting compiler arguments.
Tested with cmake .. -G Ninja -DCMAKE_C_COMPILER:PATH="clang-cl.exe" -DCMAKE_CXX_COMPILER:PATH="clang-cl.exe" -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_BUILD_CPP17=ON
Co-authored-by: Kaiyi Li <kaiyili@google.com>
* Move reflection_ts_fbs into a separate directory (#7342)
Right now, reflection_ts_fbs target is in reflection/BUILD.bazel.
This is not ideal because reflection:reflection_fbs_schema is referenced
from :flatc in the root. Thus, for any Bazel projects that want to
include flatbuffers, they need to include npm / yarn_install and nodejs
support all because reflection/BUILD.bazel loads typescript.bzl and that
requires all TypeScript things.
This PR separated that target into a different subdirectory, freeing
root BUILD.bazel from that dependency.
* Minor improvements to typescript.bzl
* Uses @...// dependencies so that flatbuffers can actually
be used as an external repo (had forgotten to upstream this earlier).
* Allows using flatbuffer_ts_library to generate reflection schemas
in the same way that flatbuffer_cc_library does (but default it
to off to avoid behavioral changes).
* Pass through a package_name attribute to flatbuffer_ts_library to
allow non-relative imports of generated typescript code.
Co-authored-by: Liu Liu <i@liuliu.me>
Presently flatc generates a placeholder for the unused synchronous varient of client-side streaming gRPCs which includes the name of an unused parameter in the method.
To avoid warnings, comment out the parameter name (in a manner similar to other gRPCS).
The logic to manage generating typescript in a single file was
generating self imports and unused local names, which triggered some
linters.
This resolves#7191
There was a step in the compilation process where benchmark data is
downloaded before starting the kotlin compilation process.
Since we are not running benchmark on CI anymore, we remove the
dependency. To run benchmarks the download task needs to be executed
manually.
* Implement optional scalars for JSON
* Add optional scalars JSON test
* Extend JSON optional scalars test to test without defaults
* Fix optional scalars in JSON for binary schema
Co-authored-by: Caleb Zulawski <caleb.zulawski@caci.com>
Right now, reflection_ts_fbs target is in reflection/BUILD.bazel.
This is not ideal because reflection:reflection_fbs_schema is referenced
from :flatc in the root. Thus, for any Bazel projects that want to
include flatbuffers, they need to include npm / yarn_install and nodejs
support all because reflection/BUILD.bazel loads typescript.bzl and that
requires all TypeScript things.
This PR separated that target into a different subdirectory, freeing
root BUILD.bazel from that dependency.