Commit Graph

1743 Commits

Author SHA1 Message Date
Lee Mracek 5d67693e8f Fix typo in build_defs.bzl (#5320) 2019-05-06 12:10:11 -07:00
Vladimir Glavnyy af74f87ccd Make MonsterExtra table a root table (#5315)
- MonsterExtra table a root table
- add mosterdata_extra.json
2019-05-02 15:12:58 -07:00
Vladimir Glavnyy b8ef8c1521 Fix issues with uint64 enums (#5265)
* Fix issues with uint64 enums

- hide the implementation of enums from code generators
- fix uint64 the issue in the cpp-generator
- fix #5108
- new tests
- enums with bit_flags attribute should be unsigned

* Refine objectives of EnumDef's FindByValue and ReverseLookup methods

- move EnumDef::ReverseLookup implementation to idl_parser.cpp
- fix typos

* Make the IsUInt64 method private
2019-05-02 13:57:58 -07:00
László Csomor 6cc30b3272 [BUILD] Fix Bazel test target //:flatbuffers_test (#5311) 2019-04-29 10:01:23 -07:00
jean-airoldie e5b6125fa2 Added common rust traits to FlatBufferBuilder (#5307)
* Added Clone, Debug and Default
2019-04-26 18:40:10 -07:00
Wouter van Oortmerssen ac14c8906f Update GRPC Java generated file.
Change-Id: I57ccbe0b9ccbbec65ca04f9db3cbd62243480d92
2019-04-24 12:34:42 -07:00
Wouter van Oortmerssen 9936adf473 [maven-release-plugin] prepare for next development iteration
Change-Id: I402d857eef9f3e5f3765427c5d3b868ed5a3a22e
2019-04-24 12:09:50 -07:00
Wouter van Oortmerssen bf9eb67ab9 [maven-release-plugin] prepare release 1.11.0
Change-Id: I716f6b915adfa6682b5d864857abf7d491d788b5
2019-04-24 12:09:44 -07:00
Wouter van Oortmerssen 9e7e8cbe9f Bumped version to 1.11.0
Change-Id: I0c87ad2cf8f8768cf40c5b7abea0add087a5518a
2019-04-24 11:34:53 -07:00
Clément Julliard b72a75f87d Doc: use correct ref types for flatcc string creation. (#5305)
Some string definitions were typed as ns(Weapon_ref_t) while they should
be flatbuffers_string_ref_t. Note that the former was also compiling &
running correctly as both ref types boil down to the same underlying ref
type.
2019-04-24 10:34:21 -07:00
Philipp Wollermann 6cfcd8628a Don't test on Ubuntu 14.04 (#5302)
Ubuntu 14.04 is about to be end-of-life and Bazel CI will stop supporting it shortly afterwards.

Context: https://groups.google.com/d/msg/bazel-dev/_D6XzfNkQQE/8TNKiNmsCAAJ
2019-04-24 10:28:35 -07:00
Damien Lespiau ddb12c0192 [Javascript] Remove newly introduced trailing whitespace in flatbuffer.js (#5300)
* Remove newly introduced trailing whitespace in flatbuffer.js

The newly introduced clear function has some trailing white space in an
otherwise whitespace clean file. Remove it.

* Remove spurious new line in the BytesBuffer construction

Another spurious white space introduced by the clear() PR.
2019-04-22 11:48:56 -07:00
Wouter van Oortmerssen 2032b94f61 Fixed file access test in the wrong location.
Change-Id: I520339b442306204563d97743efe988eab459c08
2019-04-22 09:58:29 -07:00
Damien Lespiau 860dc803fe docs: Fix where to find the Typescript typings (#5298)
This is what currently rendered:

  /flatubffers

in https://google.github.io/flatbuffers/flatbuffers_guide_use_typescript.html

Besides the typo, @types is being swallowed, the hope is that puting it between
backticks will improve the situation.
2019-04-19 13:09:26 -07:00
Wouter van Oortmerssen 5b43e4bbb8 Fix heap-buffer-overflow if there is a struct within a union
The validator previously did not check if a struct within a union was
valid, causing a heap buffer overflow.  Add a check to make sure that
the struct is valid in this case.

Change-Id: I87d41b12fdfc2a99406789531ba92b841c063c76
2019-04-19 11:49:49 -07:00
Omer Akram ecd76e898d Update snap include path instruction (#5297) 2019-04-18 15:15:21 -07:00
Wouter van Oortmerssen f55d4388e0
Update snap to use "flatbuffers" as name 2019-04-18 13:50:04 -07:00
Omer Akram e7340c390f Add Linux Snap Packaging (#5293)
* SNAP: cleanup

* Lets keep it in devel mode as it requires more testing

* add better description
2019-04-18 12:22:43 -07:00
Nils Berg 90441c2078 fix check for Enum defaults (#5292)
fixes #5288
2019-04-15 11:38:44 -07:00
Nils Berg cef8f928bb Struct typetable (#5291)
* C++: Generate MiniReflectTypeTable for Structs as well as Tables

* Update generated code

* add test
2019-04-15 11:38:00 -07:00
Vladimir Glavnyy 98b9b5a933 Add logging of warnings from the flatc compiler (#5289) 2019-04-15 11:34:09 -07:00
Wouter van Oortmerssen d07a3d2f4c Fixed VS2010 build.
Change-Id: I3ee68c5f250d6baa02060ab2ecbc0f0fe254a9d8
2019-04-11 16:14:38 -07:00
Wouter van Oortmerssen 640df2c1f5 Allow Set() methods to handle reference types
Change-Id: I487ded77d28490189dd5d38236cb04bffaf5f11a
2019-04-11 14:18:21 -07:00
Vladimir Glavnyy 60340ac529 Fix the proto-enum leaking issue (#5286)
* Detect leak with sanitizer

* Fix proto-enum leak issue
2019-04-11 13:52:01 -07:00
Vladimir Glavnyy 2bd4a27550 Detect leak with sanitizer (#5283) 2019-04-11 10:15:11 -07:00
Vladimir Glavnyy 23bb57401c Add basic test for enum defaults (#5280) 2019-04-08 10:21:30 -07:00
Vladimir Glavnyy dd6daa709b Part of #5265, neutral changes (#5281) 2019-04-08 10:05:50 -07:00
Vladimir Glavnyy dd85c3b721 Enable MSVC assert report box [Abort|Retry|Ignore] if a debugger is present (#5279) 2019-04-08 10:01:41 -07:00
Henry Lee 94cb1ff9ea Add files generated by CMake to git ignore (#5278) 2019-04-05 12:35:40 -07:00
Henry Lee 3ff6cdf491 [C++]Sync the sample monster.fbs file with the tutorial (#5277)
* Fix the header file path in the tutorial doc

* Add the path field in sample/monster.fbs to match the tutorial

* Update the lobster sample file

* Update the binary sample file
2019-04-05 12:34:53 -07:00
Matt Mastracci c329d6fa90 Ensure we don't subtract with underflow getting enum names (#5246)
* Ensure we don't subtract with underflow getting enum names

* Yep - forgot to run this
2019-04-05 12:30:58 -07:00
Anthony Liot 249f3b3714 Add method GenerateTextFromTable issue #5249 (#5266)
* Create a function GenerateGenerateTextFromTable in order to create a json from any Table

Signed-off-by: Anthony Liot <anthony.liot@gmail.com>

* Update the test to failed if loadfile or parser return false

Signed-off-by: Anthony Liot <anthony.liot@gmail.com>

* Fix snake_case name typo + space before &/*

Signed-off-by: Anthony Liot <anthony.liot@gmail.com>

* use auto

Signed-off-by: Anthony Liot <anthony.liot@gmail.com>

* Use clang-format on the added code

Signed-off-by: Anthony Liot <anthony.liot@gmail.com>
2019-04-05 11:51:29 -07:00
Kamil Rojewski 2d67de3151 Fix for build break in c# vector of unions (#5271) 2019-04-05 11:49:12 -07:00
unexge 5cdbd02404 Fix typo in Go tutorial (#5274) 2019-04-04 12:28:09 -07:00
Vladimir Glavnyy b2ce86ef8a Add compile-time checking of numerical limits in C++ code. (#5270)
* Add checking of numerical_limits<T> in C++ code.

* Add integer suffixes (LL/ULL) to int64 values in the IntegerBoundaryTest
2019-04-01 12:03:51 -07:00
tymcauley 8e7acae013 Update grammar to reflect required type signature for enum declarations. (#5269) 2019-03-28 10:48:40 -07:00
Austin Schuh 343bbe808e Add missing test data file to BUILD file (#5264)
$ cat
/home/austin/.cache/bazel/_bazel_austin/4b3182bfa237d7e256d9f18ffe58322f/execroot/com_github_google_flatbuffers/bazel-out/k8-opt/testlogs/flatbuffers_test/test.log
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //:flatbuffers_test
-----------------------------------------------------------------------------
VALUE: "0"
EXPECTED: "1"
TEST FAILED: tests/test.cpp:2029, flatbuffers::LoadFile( (test_data_path
+ "union_vector/union_vector.json").c_str(), false, &jsonfile) in
VALUE: "0"
EXPECTED: "1"
TEST FAILED: tests/test.cpp:2100, parser.Parse(jsonfile.c_str()) in
VALUE: "0"
EXPECTED: "1"
TEST FAILED: tests/test.cpp:2103, VerifyMovieBuffer(jverifier) in
2019-03-25 16:17:18 -07:00
László Csomor cb9ab2fe58 Bazel CI: fix bad value in yml (#5262)
Use the "simple format" defined here:
69cf7ec23d/buildkite/bazelci.py (L1453)

This will unbreak the "Bazel / FlatBuffers"
pipeline on Bazel CI, see
https://buildkite.com/bazel/flatbuffers
2019-03-25 12:27:35 -07:00
Nikolay Kuznetsov 4cbff97c43 Fix a warning on compiling with clang (#5258) 2019-03-25 12:06:00 -07:00
LouisP 88abae649c Add inequality operator (inspired from #263) (#5257) 2019-03-25 12:04:51 -07:00
Henry Lee a7461433c6 [C++] Changes in the flathash program (#5255)
* Correct the usage in the flathash program

As it is possible to have -- before the occurrence of the first
input STRING.

* Exit with 1 in the flathash program when an error occurs
2019-03-21 16:23:32 -07:00
Ashay Shirwadkar 440a70f4a3 Fixed tutorial markdown file (#5248)
Path specified in tutorial file was pointing to invalid location.
2019-03-21 15:51:51 -07:00
Wouter van Oortmerssen 02e73e1ae9 Further fixes to make minireflect compatible with old behavior.
Change-Id: I92c257ec4ab4a0cf4676bd98523b766ce25bf4f6
2019-03-21 15:08:04 -07:00
Vladimir Glavnyy f93d0f6ac1 Unify line ending rules in '.editorconfig' and '.gitattributes' (#5231)
* Unify line ending rules in '.editorconfig' and '.gitattributes'

* Revert '.gitattributes'

- fix invalid comments in the check-source.py
2019-03-18 12:47:07 -07:00
Wouter van Oortmerssen fd51fadaac Fixed vector_delimited excluding delimiter
Change-Id: I3e758d44b9845d6df91332bb609b4b7ad88659ac
2019-03-18 12:07:36 -07:00
Wouter van Oortmerssen 11198f10f5 Fixed shadowing warning in older gcc for vector_delimited
Change-Id: Ia4d56a5eb086f86eb5d1ad6ddae64e4a51bf3aa3
2019-03-18 10:03:43 -07:00
Wouter van Oortmerssen 3b23ff18ea Made ToStringVisitor backwards compatible with older behavior.
This to support code that relied on tables being multiline,
but not vectors.

This behavior was changed in:
b1a925dfc2 (diff-c45c8fbffbc64f7ff4aa2978612b10d8)

Change-Id: I4c95471b643b2b3fab95e06b1294e19d686b492c
2019-03-14 12:00:44 -07:00
Wouter van Oortmerssen 4f066c39ce Made JS enum declarations compatible with google closure
Original change by: https://github.com/alexames

Change-Id: Ib65bd02156d1c3637ed278a8334a2307caacaa44
2019-03-11 14:33:07 -07:00
Wouter van Oortmerssen ca68d8b043 Disabled constexpr for hashing functions.
This was incompatible with -Wc++98-c++11-compat on some platforms,
due to local variables in the function.

Change-Id: Idef510c2cefe944eef2e0656f5a219c2158063e6
2019-03-11 14:02:20 -07:00
Vladimir Glavnyy 407fb5d537 Narrows template ascii routines to prevent a possible signed overflow in generic code. (#5232) 2019-03-11 10:26:28 -07:00