145 Commits

Author SHA1 Message Date
godcong
f5664d33fb
fix go_test implement error (#7012)
* fix(grpc): fix go_test implement error

* fix(grpc): fix go_test implement error
2022-02-03 08:43:28 -08:00
Derek Bailey
b2550dbaa9
removed BSD-3-Clause license and Zlib licenses (#7073) 2022-02-02 13:12:01 -08:00
mustiikhalil
6446dcf3d6
Updates swift gen licence for grpc code (#7063) 2022-02-01 14:23:38 -08:00
Derek Bailey
7089c9ecdd
Convert flatbuffers_version_string to inline function (#7046)
* Skip conditional for python executable

* replaced flatbuffers_version_string with inline function

* use const char* instead of string
2022-01-29 19:42:56 -08:00
Panagiotis Gourgaris
b3edfdbfb7
Reverting grpc generated file suffix (#6995)
* Reverting grpc generated file suffix

* - Setting the greeter sample as it was
- Reverting the include of the generated message in grpc.cc file
2021-12-18 18:23:28 -08:00
David Sanders
fcc2bee0b6
Fix typo in variable name (#6973) 2021-12-09 10:30:15 -08:00
Panagiotis Gourgaris
fadd40e402
Have grpc include file with correct filename-suffix given to flatc (#6954)
When generating code with --grpc,  --cpp and using filename-suffix, the generated grpc files where not including the correct header that had the filename-suffix. As a suffix, they used the default "_generated".
Free functions for these were used to get the suffix. FlatBufFile had such methods, but also needed to be into its base File and use these.
- grpc generated files include the correct message header.
- grpc generated files also have the suffix
- grpc generated cc file does not include initial message header
2021-12-02 09:49:12 -08:00
Wouter van Oortmerssen
a9c341545f Fix integer overflow warnings 2021-11-18 09:41:44 -08:00
lu-wang-g
fd4ff23da0
Keep methods with struct name and switch them to default (#6879)
* Keep methods with struct name and switch them to default

This PR can help fix the following two issues:
1): A set of simplified API (without struct name) was added in
https://github.com/google/flatbuffers/pull/6336. It causes name
conflict when merging all generated python file into a single one
(the primary usage senario in Google).
2): Flatbuffers 2.0 generates absolute import path, which may cause
name space conflicts. See more details in
https://github.com/google/flatbuffers/issues/5840.

The solution for both is to generate the merged Python code, similar
C++. The merged code will not contain the simplied API, but only the
method with struct name. For issue (1), it will mimic the exactly
usage pattern for Google internal. For issue (2), users can generate
the merged flatbuffer code, without worrying about the imports.

The above idea will be implemented in the following steps:
Step 1 (this PR): revert changes in https://github.com/google/flatbuffers/pull/6336
that set the simplified API as default. Remove statements that the
original API will be deprecated, and reset the original API as default.
Step 2 (the following PR): create a flag to generate the merged code.
The Simplified API will be removed from the merged code, otherwise it
will cause name conflict.

* Update the generated sample code

* Update the generated example code

* Reverst the changes of GetRootAs

* Update examples from grpc/example/generate.sh
2021-11-04 15:12:25 -07:00
mustiikhalil
4c7a9c10d3
Adds JSON encoding to swift (#6874)
Updates generated code & removes unneeded protocol

Updates cpp to only generate code when flag is passed

Updates code gen script
2021-10-07 23:22:22 +02:00
mustiikhalil
f63c130c28
Improves documentation, and adding DocC (#6784)
Finished documenting flatbuffersbuilder

Replaces swift 5.5 with 5.2 packages

Starts building the tutorial for xcode 13

Finishes building the tutorial for xcode 13

Removes docc files from old swift versions

Updates swift style guide
2021-09-27 20:59:19 +02:00
Wouter van Oortmerssen
f20d2253ae update Java version to 2.0.3 2021-08-14 09:01:54 -07:00
Esun Kim
e012054667
[C++] Use proper gRPC C++ API when using MemoryBuffer Slice (#6756)
* Use ByteBuffer

* Use Slice

* Upgrade gRPC to 1.39.0

* Update gRPC build script

* Reformat

* Added CMAKE_CXX_STANDARD=11 when building Abseil

* Enabled ABSL_ENABLE_INSTALL

* Added absl to grpctest deps
2021-07-29 10:41:51 -07:00
Casper
c58ae94225
Add the file a symbol is declared in to Reflection (#6613)
* 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>
2021-06-17 11:50:04 -04:00
Alexander Dzyuba
e1e9f93739
[C++/grpc] added hiding of unused variables in the generated code (#6677)
Co-authored-by: Alexander Dzyuba <a.dzyuba@seraphim.online>
2021-06-06 17:40:56 +07:00
Kamil Rojewski
752c7b576d
avoiding more NoSuchMethod exceptions (#6671)
refs #6657
2021-06-03 14:18:45 -07:00
Wouter van Oortmerssen
bec23700fc Prepare for Java 2.0.1 release
see https://github.com/google/flatbuffers/pull/6658
2021-05-24 12:20:45 -07:00
mustiikhalil
fbcb3c4236
[TS/JS] Updates the grpc (#6654)
* Updates go lang support to allow other languages to communicate with it

* Update js grpc lib to use grpc-js

Reformat code
2021-05-20 11:34:17 -07:00
mustiikhalil
8937dcfd78
Updates go lang support to allow other languages to communicate with it (#6653) 2021-05-20 11:32:56 -07:00
Richard A Hofer
f1884c66f4
Fix gRPC test to use EndVector without specifying the length. (#6646) 2021-05-17 11:27:49 -07:00
mustiikhalil
a5175c513a
Implements verifier and code gen for swift (#6373)
Updates test cases on linux

Adhere to new protocol naming

Adds fuzzing

Adds documentation

Adds support for string unions

Updated fuzzer generated code
2021-05-14 20:59:28 +03:00
Wouter van Oortmerssen
c121c03456 Fixed Java gRPC version number dependency
Change-Id: I6c4ed59ab4bb06edcef4b33c179f6e02ec86fdbb
2021-05-13 13:32:13 -07:00
Wouter van Oortmerssen
a9a295fecf More missing version changes 2021-05-10 11:45:16 -07:00
Wouter van Oortmerssen
8a7d013f85 Updated main version numbers to 2.0 2021-05-10 11:14:47 -07:00
mustiikhalil
4ccc52c7a0
[swift] Implements union strings (#6589) 2021-04-24 14:47:24 +03:00
Björn Harrtell
408e4db4af
[TS] Add Build TS to CI jobs (#6524)
* 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
2021-04-12 10:41:59 -07:00
mustiikhalil
cd67261bba
[CI] fixes buildkite (#6544) 2021-04-05 12:34:42 +03:00
Jeong YunWon
276b1bc342
[grpc] Support latest version of grpc PoC (#6338)
* use grpcpp rather than deprecated grpc++

* grpcpp Deserialize take ByteBuffer instead of grpc_byte_buffer

* grpc 1.36.0

* Fix to use grpc 1.36.0

* Fix CMakeLists to refer gRPC

* add find_package(Threads)

* Update bazel deps

* Apply workaround about boringssl build error

* Install latest cmake for osx on travis-ci

Co-authored-by: Yeom Gyusun <omniavinco@gmail.com>
2021-03-25 12:12:35 -07:00
mustiikhalil
3b7d1e86b4
[GO] Tries to add go format to the CI (#6518)
* Trys to add go format to the CI

Adds Gofmt to CI

* Adds formatting for go dir in grpc

* Small fix
2021-03-18 11:03:44 -07:00
mustiikhalil
fc4fffea41
Bump grpc to 1.0.0 (#6507)
Adds void to keywords
2021-03-09 10:56:06 +03:00
mustiikhalil
8142fedd19
Working on a python example plus fixing python grpc code (#6456)
Refactored python grpc code gen

Adds example server & client + fixes ci

Fixes generated code

Making sure we encode the reply string as utf8

Adds Readme details to clarify issue regarding encoding when python is sending/receiving
2021-02-25 14:38:12 -08:00
mustiikhalil
ffc2ef77ca
[CI] Adds Code Generation tests on Github Actions (#6482)
Moves check-grpc-generation to scripts
2021-02-23 08:51:39 +03:00
mustiikhalil
b5da526e6d
[Swift] Moves grpc example to grpc/examples (#6479)
Updates generated Code

Removes grpc generation code from tests dir

Small fix to generate.sh
2021-02-20 23:07:48 +03:00
mustiikhalil
3b5365762d
[TS] Moves grpc code to examples folder (#6476)
Adds readme
2021-02-20 20:31:00 +03:00
mustiikhalil
0c7ae58164
[Go] Working on a go example plus fixing go grpc code (#6448)
Implemented server.go and half implemented client.go

Finishes implementation for greeter go example

Update grpc code for monster.fbs

Adds a couple of cpp methods

Adhere to gofmt standards

Adds a readme for issues with grpc
2021-02-19 12:47:59 +03:00
mustiikhalil
6af37e6729
[CMake] Renames BUILD files (#6457)
* Renamed build to build.bazel to stop xcode from complaining about it

* Renamed all build to build.bazel

* Fixes small ci issue
2021-02-11 10:16:57 -08:00
mustiikhalil
60eed0ca66
Updating working code (#6441)
Fixes issues with namespaces in grpc ts

Renamed welcome -> models
2021-02-10 11:46:45 -08:00
mustiikhalil
815d3e820d
Upgrade swift grpc to alpha 24 (#6439)
Upgrade swift grpc to alpha 24
2021-02-04 02:01:18 +03:00
mustiikhalil
537212afee
[Swift] Adds a format file and reformats the swift project (#6250)
* Formats files & adds licence

* Revert arrays

* Keeps array indentation as is

* Adds licence to code formatter

* Updates code generators
2020-11-16 19:52:38 +03:00
Niels Hofmans
0e1415b996
fix(go_test): remove deprecated grpc call (#6183) 2020-10-15 15:47:06 -07:00
dependabot[bot]
5be777e1d4
Bump junit from 4.12 to 4.13.1 in /grpc/tests (#6173)
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-12 22:58:29 -07:00
dependabot[bot]
a49d440ecd
Bump junit from 4.12 to 4.13.1 in /grpc (#6172)
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-12 22:58:03 -07:00
mustiikhalil
7b9e61fccf
[TS] GRPC Implementation (#6141)
* GRPC implementation for Typescript

* Fixes a couple of issues

* Finished implementing the typescript support for grpc

* Updated generated code

* Fixes CI
2020-10-07 09:56:30 -07:00
mustiikhalil
eeacc53d22
Adds proper access types for swift object api & flatbuffers & grpc (#6081)
Fixes accessor in greeter.swift

Small fix for ci
2020-08-22 22:39:09 +03:00
Liu Liu
a0fb30575c
[Swift] Append namespace for Swift Grpc implementation (#6049)
* [Swift] Append namespace for Swift Grpc implementation
* Separate ServiceName from ServiceQualifiedName.
2020-07-31 10:07:45 +03:00
Shengzhe
c8fa0afdfc
Allow to run cpp tests under grpc/tests/ using bazel. (#6040)
This is the first step to upgrade grpc dependency to the latest version.

- Patch protobuf 3.6.1. and grpc 1.15.1 to fix build errors when using the latest Bazel version (3.4.1).
- Add grpc/tests:grpc_test. One can kick off tests in Bazel by calling `bazel test grpc/tests/...`.
- Add missing build targets in tests/BUILD in order to support grpc/tests/BUILD
2020-07-21 11:08:01 -07:00
mustiikhalil
ff1b73128d
[Swift] Optional Scalars Preparation (#6028)
* Perpares swift to take optional scalars + adds optional string helper method + disables linters in generated code

* Small fix for generated code

* Update grpc support to alpha 17 for swift
2020-07-20 20:38:50 +03:00
mustiikhalil
666800da36
Adds bool support in structs + updates grpc support + CI upgrades (#5943) 2020-06-04 09:14:18 -07:00
mustiikhalil
9655e12d6d
Upgraded swift implementation for grpc (#5843)
Updated version number
2020-04-06 10:05:56 -07:00
Wouter van Oortmerssen
697147a2e6 updated maven build files
Change-Id: I33c69978fe7a22485a7fd5ceb7a480e84e8bcdb3
2020-03-16 11:33:42 -07:00