Commit Graph

82 Commits

Author SHA1 Message Date
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
Wouter van Oortmerssen 6df40a2471 pre-tag version bump for 1.12
Change-Id: I84a9365e9d8a1afe333b1df85058401ffe0a6b7c
2020-03-12 15:33:39 -07:00
Derek Bailey 6ff1898413
Added --filename-suffix and --filename-ext to flatc (#5778)
* Fixed refractoring issue in reflection/generate_code.sh. Also, mv deletes the original file, so I don't need to clean it up manually in that case.

* Added --filename-suffix and --filename-ext to flatc

* Fixed typo and added example generation of suffix and extension for C++

* Removed extra ;

* Removed clang-format block from a region that didn't need it. Fixed an auto format of another clang-format block

* Added docs, fixed pointer alignment, removed suffix test file
2020-03-02 10:15:23 -08:00
mustiikhalil 34305c4ce4
[Swift] Adds GRPC to Swift (#5758)
* Adds the basic structure for required to add grpc support

Added the message implementation

Updated the code to confirm to the protocol flatbuffersobject

Adds an example for Swift flatbuffers GRPC

Started implementing the swift GRPC code Gen

Generator generates protocols now

Fixing ci issues

Migrated the logic to use grpc_generator::File instead of string

Refactored swift project

Implemented GRPC in swift

Finished implementing GRPC in swift

Fixes issues

Adds contiguousBytes initializer to swift

Adds documentation + fixes buffer nameing in tables + structs

Adds documentation + fixes buffer nameing in tables + structs

Updated tests

* Updated version
2020-02-24 09:27:41 -08:00
Austin Schuh b4154405d1 Fix --incompatible_load_cc_rules_from_bzl (#5683)
Incompatible flag --incompatible_load_cc_rules_from_bzl will break
FlatBuffers once Bazel 1.2.1 is released.

Fixes #5671
2019-12-26 10:03:22 -08:00
Wouter van Oortmerssen 5e3916050c Fixed out of date licenses on gRPC Python files.
Change-Id: Ia6c3bf5d7da795db46c0baa8e9c7591de3400517
2019-12-23 14:01:41 -08:00
Vladimir Glavnyy 44bf719883 Add flatc '--cpp_std' switch (#5656)
* Add flatc '--cpp_std' switch and sandbox for C++17 code generator

- Added 'flac --cpp_std legacy' for compatibility with old compilers (VS2010);
- Added experimental switch 'flac --cpp_std c++17' for future development;
- Added C++17 sandbox test_cpp17.cpp;
- C++ code generator generates enums with explicit underlying type to avoid problems with the forward and backward schema compatibility;
- Adjusted CMakeLists.txt, CI and generate code scripts to support of introduced '--cpp_std';

* Fix --cpp_std values: c++0x, c++11, c++17

* Add 'cpp::CppStandard' enum

* Add testing engine into test_cpp17

* Rebase to upstream/master

* Set default '--cpp-std C++0x'

* Fix code generation (--cpp_std C++11) in CMakeLists.txt

- Fix dependency declaration of grpctest target

* Revert --cpp-std for the tests from explicit C++11 to flatc default value (C++0x)
2019-12-23 12:13:48 -08:00
Gautham B A f9724d1bde [gRPC] Uncomment MessageBuilder (#5658)
The line where the MessageBuilder was
constructed was commented out (perhaps
an oversight).
2019-12-09 10:28:31 -08:00
bttk 99d11e279f Split Bazel targets into multiple packages (#5640)
* Split Bazel targets into multiple packages

* Merge /include/BUILD back into /BUILD
2019-12-02 14:14:48 -08:00
Malar Kannan 6beb9f49cb Support for python grpc - continuing the work from the pull request #4270 #4705 (#5613)
* Support for python grpc

* add few fixes

* Fixes build

* Fix python generator

* Add tests

* Fix grpc python test

* Fix tests and add incomplete python generator

* Fix python generator

* Add python generator methods

* Fix Appveyor build

* grpc python support v0.1

* Update tests

* update grpctest

* Remove duplicated code and fix a brace

* tests for flatbuffers grpc python

* Updated tests + removed SerializeToString, From String

* remove pickle import

* include missing files in ci - BUILD and generated test result
2019-11-14 16:58:35 -08:00
Derek Bailey 42c08cbca6 Ran src/clang-format-all.sh (#5617) 2019-11-11 09:29:37 -08:00
Wouter van Oortmerssen e837d5a296 Fixed deprecated method in GRPC Java test.
Change-Id: Iccae8fe9409adbf3cd3013a5cf3368e068175ad3
2019-11-04 17:23:01 -08:00
Wouter van Oortmerssen c978b9ef1f Enforce matching version in Java and C#.
Change-Id: I7f1f12f2f97e5227e0dabc2965ce66a6d41c229c
2019-05-31 12:15:19 -07:00
Wouter van Oortmerssen 9e7e8cbe9f Bumped version to 1.11.0
Change-Id: I0c87ad2cf8f8768cf40c5b7abea0add087a5518a
2019-04-24 11:34:53 -07:00