1. 17 Jan, 2019 3 commits
  2. 14 Jan, 2019 3 commits
  3. 07 Jan, 2019 3 commits
    • Vladimir Glavnyy's avatar
    • Vladimir Glavnyy's avatar
      Add `NaN` and `Inf` defaults to the C++ generated code. (#5102) · dd288f71
      Vladimir Glavnyy authored
      * Add `NaN` and `Inf` defaults to the C++ generated code.
      
      * Refactoring: add FloatConstantGenerator
      
      * Refactoring-2:
      
      - remove isnan checking for all float/double values
      - add most probable implementation of virtual methods of FloatConstantGenerator
      
      * Add conditional (FLATBUFFERS_NAN_DEFAULTS) isnan checking
      dd288f71
    • Yong Tang's avatar
      Add repository name to build_defs.bzl (#5104) · 155c5590
      Yong Tang authored
      In flatbuffers, build_defs.bzl has been updated to have the
      bazel rule `flatbuffer_cc_library` defined. Therefore, it should
      be possible to build another application and using `flatbuffer_cc_library`
      directly (by `load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")`)
      
      However, when I tried to do the above, I saw the following errors in bazel:
      ```
      ERROR: /root/.cache/bazel/_bazel_root/c27e9809996ce9a9c0ed8dd79ef0897b/external/arrow/BUILD.bazel:12:1: in deps attribute of cc_library rule @arrow//:arrow_format: target '@arrow//:runtime_cc' does not exist. Since this rule was created by the macro 'flatbuffer_cc_library', the error might have been caused by the macro implementation in /root/.cache/bazel/_bazel_root/c27e9809996ce9a9c0ed8dd79ef0897b/external/com_github_google_flatbuffers/build_defs.bzl:216:16
      ```
      
      The reason for the bazel error was that `//:runtime_cc` and `//:flatc` does not have
      the repo name prefixed.
      
      By prefix `` the above bazel build error could be resolved.
      
      This fix should help other programs to use flatbuffers directly through bazel.
      Signed-off-by: 's avatarYong Tang <yong.tang.github@outlook.com>
      155c5590
  4. 28 Dec, 2018 1 commit
    • Robert's avatar
      [Go] Namespaced imports fix (#5097) · 0eb7b3be
      Robert authored
      Track and emit required FlatBuffers namespace imports in generated Go code.
      
      Update Go code generator by moving most functionality into the generator class, to facilitate namespace tracking. (Note that the git diff in this combined commit may appear large due to this refactoring, but very little code was actually changed.)
      Update Go code generator by tracking namespace imports when generating FlatBuffers code.
      Update Go code generator by emitting package imports to correctly reference code in other FlatBuffers namespaces.
      Create Go test that checks the usage of InParentNamespace objects (as defined in the example schema).
      Create Docker test that checks the Go language port.
      Fixes #4883
      Fixes #3927
      
      Individual commits:
      
      * remove "static" from soon-to-be method functions
      * move almost all functions into class as methods
      * set current namespace and emit package names if needed
      * track imported namespaces
      * parent namespaces work
      * docker test for go ^1.11
      * update base image name for go docker test
      * remove cerr debugging
      * formatting fixes
      * re-run generate_code.sh
      * explicitly test namespace imports and usage
      0eb7b3be
  5. 27 Dec, 2018 1 commit
  6. 21 Dec, 2018 1 commit
  7. 17 Dec, 2018 2 commits
  8. 13 Dec, 2018 2 commits
    • tira-misu's avatar
      Enable flatbuffer to initialize Parser from bfbs (#4283) (#5077) · dba962eb
      tira-misu authored
      * Enable flatbuffer to initialize Parser from bfbs (#4283)
      
      Now its possible to generate json data from bfbs data type and flatbuffers data
      and visa versa.
      
      * add deserialize functionality in parser from bfbs
      * add small usage sample
      
      * Fix build break
      
      * Merge branch 'pr/1' into fix-issue4283
      
      * Fix buildbreak
      
      * Build monster_test.bfbs with --bfbs-builtins
      
      Attribute flexbuffer has be included in bfbs. Only with this attribute test
      will run. By initialization a parser by a bfbs the attribute has to be known
      for this filed. monsterdata_test.golden has a flexbuffer field so parse would
      fail.
      
      * Fix generate_code.sh
      
      * Revert automatic indent changes by IDE
      
      * Auto detect size prefixed binary schema files
      
      * Use identifier (bfbs) to detect schema files
      dba962eb
    • Christian Lang's avatar
  9. 10 Dec, 2018 2 commits
    • Rob Agar's avatar
      Get rid of reproducible build warning by removing build date & time from flatc version (#5086) · 58e8552d
      Rob Agar authored
      * disable reproducible build warning due to date/time macros
      
      * wrapped GCC pragmas in #ifdef _GNUC_
      
      * removed __DATE__ and __TIME__ macros from flatc.cpp
      58e8552d
    • Austin Schuh's avatar
      Add flatbuffer_cc library support (#5061) · d56a4055
      Austin Schuh authored
      * Add flatbuffer_cc library support
      
      * Update flags so all the tests pass
      
      Tests now all pass!
      
      * Modify the tests to use the generated code
      
      This should be a simple serialize/deserialize test of the new generated
      code to make sure the bazel rules are doing something sane.
      
      * Use generated monster_test.fb in testing/test.cpp
      
      cmake drops it's generated code in tests/monster_test_generated.h
      Instead of checking that in, let's generate it with bazel.
      
      * Make grpc tests depend on monster_test_generated.h
      
      * Remove redundant cmake dependency
      
      This should address @aardappel's feedback.
      
      * Run flatc for Android as well
      
      This will fix the last travis.ci failure
      
      * Add generated output folder and fix flags
      
      * Move flatbuffers_header_build_rules to the library that uses it
      
      * Use --cpp-ptr-type to fix android
      
      Android was the only target using the STL emulation layer.  It needed
      the --cpp-ptr-type flatbuffers::unique_ptr flag to work.  Add it!
      
      * Roll back changes to use autogenerated monster_test_generated.
      
      Flip tests/test.cpp to use the autogenerated file as well.
      d56a4055
  10. 06 Dec, 2018 1 commit
  11. 03 Dec, 2018 2 commits
  12. 30 Nov, 2018 1 commit
    • Robert's avatar
      CI: Dockerized language port tests (#5066) · 79cd55bd
      Robert authored
      This runs a script in TravisCI that executes a bunch of small Docker image
      scripts to test the language ports in isolated environments. This allows us to
      test multiple language versions with little additional complexity.
      
      Covers:
      
      + Java OpenJDK 10.0.2
      + Java OpenJDK 11.0.1
      + Node 10.13.0
      + Node 11.2.0
      + Python CPython 2.7.15
      + Python CPython 3.7.1
      + Rust 1.30.1
      79cd55bd
  13. 29 Nov, 2018 2 commits
  14. 17 Nov, 2018 3 commits
    • Robert's avatar
      0143f4e3
    • Russell Chou's avatar
      Make Parser skip files it's seen already. (#5048) · e161ade6
      Russell Chou authored
      The use case is so we can batch compile a bunch of schemas, some which can depend on each other, without caring about their order.
      e161ade6
    • Wouter van Oortmerssen's avatar
      Make string/vector field serialization order not depend on optimizer. · f575b02f
      Wouter van Oortmerssen authored
      Multiple calls of e.g. CreateString inside a call to a CreateTable
      could cause those strings to end up in different locations in the
      wire format, since order or argument evaluation is undefined.
      
      This is allowed by the FlatBuffer format, but it is not helpful,
      especially when debugging the contents of binaries, or comparing
      against a "golden" binary for tests etc.
      
      Now making sure that all the CreateTableDirect calls first serialize
      sub strings/vectors before calling CreateTable.
      
      Also made similar changes to the serialization of "binary schemas".
      
      Change-Id: I5747c4038b37a0d400aca2bc592bec751cf5c172
      f575b02f
  15. 16 Nov, 2018 4 commits
  16. 15 Nov, 2018 1 commit
  17. 13 Nov, 2018 1 commit
  18. 12 Nov, 2018 3 commits
  19. 06 Nov, 2018 1 commit
  20. 05 Nov, 2018 1 commit
  21. 02 Nov, 2018 2 commits