Squashed 'third_party/flatbuffers/' changes from bc44fad35..8aa8b9139
8aa8b9139 Fix handling of +/-inf defaults in TS/rust/go/dart codegen (#7588)
001adf782 Add support for parsing proto map fields (#7613)
dbc58ab77 Fix help output for --gen-includes (#7611)
2facfeec7 Fix missing spaces in flatc help text (#7612)
4de2814c7 Fix: arduino platform build (#7625)
37b1acdaf Fix current official name of macOS (#7627)
a22434e2a Add missing #include <algorithm> for std::min/std::max uses, and #include <limits> for std::numeric_limits<> (#7624)
214cc9468 Bump Rust version to 22.10.26 before publication (#7622)
a4ff275d9 Added option to not requires an EoF token when parsing JSON (#7620)
15f32c690 python: object generation prefix and suffix (#7565)
051afd882 Add CreateSharedString to python builder (#7608)
728c033ad Add check for presence of realpath to CMakeLists.txt to support more platforms (#7603)
4c514483d Update DartTest.sh golden files (#7606)
c2d9c2080 [TS] Add support for fixed length arrays on Typescript (#5864) (#7021) (#7581)
e34ae4c6b `build.yml`: Fix missing 'v' in version
e54536127 `build.yml` Update to Kotlin Wrapper 1.0.5
49d9f941c `release.yml` Use env var for passphrase
cefc21c1f `release.yml` Add GPG key for Maven
3e64fa724 `release.yml`: Add Maven Steps
b15f3c57e `release_yml` Use new dotnet version
ff802c680 `release.yml` Use NuGet Key directly
b401957d5 `release.yml` Changed Push to follow examples
8c8151f8f `release.yml` Fix nuget push command
ebb7c203d `release.yml` Add Nuget support
203241ed3 FlatBuffers Version 22.10.26 (#7607)
ac485609c `setup.py`: Define version directly
de5b85aa6 `release.yml`: Switch to `python` directory
de3df2d88 `release.yml`: Add publishing to PyPi
043a24f2e [Python] Fixed the issue with nested unions relying on InitFromBuf. (#7576)
5a48b0d7d release.yml: Typo
ce307556f release.yml: Remove `npm ci`
cb616e27c Create release.yml (#7605)
a54ca1e75 FlatBuffers Version 22.10.25 (#7604)
5b3fadcc1 [vector] Allow to iterate with mutables (#7586)
872a49746 [Nim] Bfbs Nim Generator (#7534)
e30170296 Make type conversions explicit. (#7595)
f7b734438 Fix LongEnum definitions (#7596)
5792623df Rust fix compilation for no_std targets #2 (#7553)
0edb27528 Update Rust version (#7574)
acc6a20d3 tests/test.cpp contains a couple of tests that are only executed (#7571)
04cd037ba Fix #7580 by documenting union schema evolution rules (#7585)
e1c5db988 Turn on clippy for Rust and fix lints for non-generated code (#7575)
b80142b90 Update documentation to mention enum value attributes (#7570)
54418f371 Add support for metadata attributes for enum values (#7567) (#7568)
c92e78a9f FlatBuffers Version 22.9.29 (#7557)
d243b904c [TS] Make strict compliant and improve typings (#7549)
374f8fb5f Rust soundness fixes (#7518)
dadbff571 Moves swift package to root of repository so it can be used directly … (#7548)
76ddae006 FlatBuffers Version 22.9.24 (#7547)
cfe157ec5 Emit internal enums when swift_implementation_only (#7545)
413115858 [Python] Python fixed size array (#7529)
88046190e Upgrade grpc to 1.49.0 and make sure it builds (#7538)
72aa85a75 [C++] Rare bad buffer content alignment if sizeof(T) != alignof(T) (#7520)
bfceebb7f Fix conform (#7532)
git-subtree-dir: third_party/flatbuffers
git-subtree-split: 8aa8b9139eb330f27816a5b8b5bbef402fbe3632
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
Change-Id: I943faba499baf58e9f561b1e4734922188ba8626
diff --git a/tests/monster_test_my_game.example_generated.dart b/tests/monster_test_my_game.example_generated.dart
index 174fe1d..a9e9e81 100644
--- a/tests/monster_test_my_game.example_generated.dart
+++ b/tests/monster_test_my_game.example_generated.dart
@@ -1258,10 +1258,18 @@
Test? get nativeInline => Test.reader.vTableGetNullable(_bc, _bcOffset, 106);
LongEnum get longEnumNonEnumDefault => LongEnum.fromValue(const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 108, 0));
LongEnum get longEnumNormalDefault => LongEnum.fromValue(const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 110, 2));
+ double get nanDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 112, double.nan);
+ double get infDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 114, double.infinity);
+ double get positiveInfDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 116, double.infinity);
+ double get infinityDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 118, double.infinity);
+ double get positiveInfinityDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 120, double.infinity);
+ double get negativeInfDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 122, double.negativeInfinity);
+ double get negativeInfinityDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 124, double.negativeInfinity);
+ double get doubleInfDefault => const fb.Float64Reader().vTableGet(_bc, _bcOffset, 126, double.infinity);
@override
String toString() {
- return 'Monster{pos: ${pos}, mana: ${mana}, hp: ${hp}, name: ${name}, inventory: ${inventory}, color: ${color}, testType: ${testType}, test: ${test}, test4: ${test4}, testarrayofstring: ${testarrayofstring}, testarrayoftables: ${testarrayoftables}, enemy: ${enemy}, testnestedflatbuffer: ${testnestedflatbuffer}, testempty: ${testempty}, testbool: ${testbool}, testhashs32Fnv1: ${testhashs32Fnv1}, testhashu32Fnv1: ${testhashu32Fnv1}, testhashs64Fnv1: ${testhashs64Fnv1}, testhashu64Fnv1: ${testhashu64Fnv1}, testhashs32Fnv1a: ${testhashs32Fnv1a}, testhashu32Fnv1a: ${testhashu32Fnv1a}, testhashs64Fnv1a: ${testhashs64Fnv1a}, testhashu64Fnv1a: ${testhashu64Fnv1a}, testarrayofbools: ${testarrayofbools}, testf: ${testf}, testf2: ${testf2}, testf3: ${testf3}, testarrayofstring2: ${testarrayofstring2}, testarrayofsortedstruct: ${testarrayofsortedstruct}, flex: ${flex}, test5: ${test5}, vectorOfLongs: ${vectorOfLongs}, vectorOfDoubles: ${vectorOfDoubles}, parentNamespaceTest: ${parentNamespaceTest}, vectorOfReferrables: ${vectorOfReferrables}, singleWeakReference: ${singleWeakReference}, vectorOfWeakReferences: ${vectorOfWeakReferences}, vectorOfStrongReferrables: ${vectorOfStrongReferrables}, coOwningReference: ${coOwningReference}, vectorOfCoOwningReferences: ${vectorOfCoOwningReferences}, nonOwningReference: ${nonOwningReference}, vectorOfNonOwningReferences: ${vectorOfNonOwningReferences}, anyUniqueType: ${anyUniqueType}, anyUnique: ${anyUnique}, anyAmbiguousType: ${anyAmbiguousType}, anyAmbiguous: ${anyAmbiguous}, vectorOfEnums: ${vectorOfEnums}, signedEnum: ${signedEnum}, testrequirednestedflatbuffer: ${testrequirednestedflatbuffer}, scalarKeySortedTables: ${scalarKeySortedTables}, nativeInline: ${nativeInline}, longEnumNonEnumDefault: ${longEnumNonEnumDefault}, longEnumNormalDefault: ${longEnumNormalDefault}}';
+ return 'Monster{pos: ${pos}, mana: ${mana}, hp: ${hp}, name: ${name}, inventory: ${inventory}, color: ${color}, testType: ${testType}, test: ${test}, test4: ${test4}, testarrayofstring: ${testarrayofstring}, testarrayoftables: ${testarrayoftables}, enemy: ${enemy}, testnestedflatbuffer: ${testnestedflatbuffer}, testempty: ${testempty}, testbool: ${testbool}, testhashs32Fnv1: ${testhashs32Fnv1}, testhashu32Fnv1: ${testhashu32Fnv1}, testhashs64Fnv1: ${testhashs64Fnv1}, testhashu64Fnv1: ${testhashu64Fnv1}, testhashs32Fnv1a: ${testhashs32Fnv1a}, testhashu32Fnv1a: ${testhashu32Fnv1a}, testhashs64Fnv1a: ${testhashs64Fnv1a}, testhashu64Fnv1a: ${testhashu64Fnv1a}, testarrayofbools: ${testarrayofbools}, testf: ${testf}, testf2: ${testf2}, testf3: ${testf3}, testarrayofstring2: ${testarrayofstring2}, testarrayofsortedstruct: ${testarrayofsortedstruct}, flex: ${flex}, test5: ${test5}, vectorOfLongs: ${vectorOfLongs}, vectorOfDoubles: ${vectorOfDoubles}, parentNamespaceTest: ${parentNamespaceTest}, vectorOfReferrables: ${vectorOfReferrables}, singleWeakReference: ${singleWeakReference}, vectorOfWeakReferences: ${vectorOfWeakReferences}, vectorOfStrongReferrables: ${vectorOfStrongReferrables}, coOwningReference: ${coOwningReference}, vectorOfCoOwningReferences: ${vectorOfCoOwningReferences}, nonOwningReference: ${nonOwningReference}, vectorOfNonOwningReferences: ${vectorOfNonOwningReferences}, anyUniqueType: ${anyUniqueType}, anyUnique: ${anyUnique}, anyAmbiguousType: ${anyAmbiguousType}, anyAmbiguous: ${anyAmbiguous}, vectorOfEnums: ${vectorOfEnums}, signedEnum: ${signedEnum}, testrequirednestedflatbuffer: ${testrequirednestedflatbuffer}, scalarKeySortedTables: ${scalarKeySortedTables}, nativeInline: ${nativeInline}, longEnumNonEnumDefault: ${longEnumNonEnumDefault}, longEnumNormalDefault: ${longEnumNormalDefault}, nanDefault: ${nanDefault}, infDefault: ${infDefault}, positiveInfDefault: ${positiveInfDefault}, infinityDefault: ${infinityDefault}, positiveInfinityDefault: ${positiveInfinityDefault}, negativeInfDefault: ${negativeInfDefault}, negativeInfinityDefault: ${negativeInfinityDefault}, doubleInfDefault: ${doubleInfDefault}}';
}
MonsterT unpack() => MonsterT(
@@ -1317,7 +1325,15 @@
scalarKeySortedTables: scalarKeySortedTables?.map((e) => e.unpack()).toList(),
nativeInline: nativeInline?.unpack(),
longEnumNonEnumDefault: longEnumNonEnumDefault,
- longEnumNormalDefault: longEnumNormalDefault);
+ longEnumNormalDefault: longEnumNormalDefault,
+ nanDefault: nanDefault,
+ infDefault: infDefault,
+ positiveInfDefault: positiveInfDefault,
+ infinityDefault: infinityDefault,
+ positiveInfinityDefault: positiveInfinityDefault,
+ negativeInfDefault: negativeInfDefault,
+ negativeInfinityDefault: negativeInfinityDefault,
+ doubleInfDefault: doubleInfDefault);
static int pack(fb.Builder fbBuilder, MonsterT? object) {
if (object == null) return 0;
@@ -1382,6 +1398,14 @@
TestT? nativeInline;
LongEnum longEnumNonEnumDefault;
LongEnum longEnumNormalDefault;
+ double nanDefault;
+ double infDefault;
+ double positiveInfDefault;
+ double infinityDefault;
+ double positiveInfinityDefault;
+ double negativeInfDefault;
+ double negativeInfinityDefault;
+ double doubleInfDefault;
MonsterT({
this.pos,
@@ -1436,7 +1460,15 @@
this.scalarKeySortedTables,
this.nativeInline,
this.longEnumNonEnumDefault = const LongEnum._(0),
- this.longEnumNormalDefault = LongEnum.LongOne});
+ this.longEnumNormalDefault = LongEnum.LongOne,
+ this.nanDefault = double.nan,
+ this.infDefault = double.infinity,
+ this.positiveInfDefault = double.infinity,
+ this.infinityDefault = double.infinity,
+ this.positiveInfinityDefault = double.infinity,
+ this.negativeInfDefault = double.negativeInfinity,
+ this.negativeInfinityDefault = double.negativeInfinity,
+ this.doubleInfDefault = double.infinity});
@override
int pack(fb.Builder fbBuilder) {
@@ -1497,7 +1529,7 @@
: fbBuilder.writeListUint8(testrequirednestedflatbuffer!);
final int? scalarKeySortedTablesOffset = scalarKeySortedTables == null ? null
: fbBuilder.writeList(scalarKeySortedTables!.map((b) => b.pack(fbBuilder)).toList());
- fbBuilder.startTable(54);
+ fbBuilder.startTable(62);
if (pos != null) {
fbBuilder.addStruct(0, pos!.pack(fbBuilder));
}
@@ -1555,12 +1587,20 @@
}
fbBuilder.addUint64(52, longEnumNonEnumDefault.value);
fbBuilder.addUint64(53, longEnumNormalDefault.value);
+ fbBuilder.addFloat32(54, nanDefault);
+ fbBuilder.addFloat32(55, infDefault);
+ fbBuilder.addFloat32(56, positiveInfDefault);
+ fbBuilder.addFloat32(57, infinityDefault);
+ fbBuilder.addFloat32(58, positiveInfinityDefault);
+ fbBuilder.addFloat32(59, negativeInfDefault);
+ fbBuilder.addFloat32(60, negativeInfinityDefault);
+ fbBuilder.addFloat64(61, doubleInfDefault);
return fbBuilder.endTable();
}
@override
String toString() {
- return 'MonsterT{pos: ${pos}, mana: ${mana}, hp: ${hp}, name: ${name}, inventory: ${inventory}, color: ${color}, testType: ${testType}, test: ${test}, test4: ${test4}, testarrayofstring: ${testarrayofstring}, testarrayoftables: ${testarrayoftables}, enemy: ${enemy}, testnestedflatbuffer: ${testnestedflatbuffer}, testempty: ${testempty}, testbool: ${testbool}, testhashs32Fnv1: ${testhashs32Fnv1}, testhashu32Fnv1: ${testhashu32Fnv1}, testhashs64Fnv1: ${testhashs64Fnv1}, testhashu64Fnv1: ${testhashu64Fnv1}, testhashs32Fnv1a: ${testhashs32Fnv1a}, testhashu32Fnv1a: ${testhashu32Fnv1a}, testhashs64Fnv1a: ${testhashs64Fnv1a}, testhashu64Fnv1a: ${testhashu64Fnv1a}, testarrayofbools: ${testarrayofbools}, testf: ${testf}, testf2: ${testf2}, testf3: ${testf3}, testarrayofstring2: ${testarrayofstring2}, testarrayofsortedstruct: ${testarrayofsortedstruct}, flex: ${flex}, test5: ${test5}, vectorOfLongs: ${vectorOfLongs}, vectorOfDoubles: ${vectorOfDoubles}, parentNamespaceTest: ${parentNamespaceTest}, vectorOfReferrables: ${vectorOfReferrables}, singleWeakReference: ${singleWeakReference}, vectorOfWeakReferences: ${vectorOfWeakReferences}, vectorOfStrongReferrables: ${vectorOfStrongReferrables}, coOwningReference: ${coOwningReference}, vectorOfCoOwningReferences: ${vectorOfCoOwningReferences}, nonOwningReference: ${nonOwningReference}, vectorOfNonOwningReferences: ${vectorOfNonOwningReferences}, anyUniqueType: ${anyUniqueType}, anyUnique: ${anyUnique}, anyAmbiguousType: ${anyAmbiguousType}, anyAmbiguous: ${anyAmbiguous}, vectorOfEnums: ${vectorOfEnums}, signedEnum: ${signedEnum}, testrequirednestedflatbuffer: ${testrequirednestedflatbuffer}, scalarKeySortedTables: ${scalarKeySortedTables}, nativeInline: ${nativeInline}, longEnumNonEnumDefault: ${longEnumNonEnumDefault}, longEnumNormalDefault: ${longEnumNormalDefault}}';
+ return 'MonsterT{pos: ${pos}, mana: ${mana}, hp: ${hp}, name: ${name}, inventory: ${inventory}, color: ${color}, testType: ${testType}, test: ${test}, test4: ${test4}, testarrayofstring: ${testarrayofstring}, testarrayoftables: ${testarrayoftables}, enemy: ${enemy}, testnestedflatbuffer: ${testnestedflatbuffer}, testempty: ${testempty}, testbool: ${testbool}, testhashs32Fnv1: ${testhashs32Fnv1}, testhashu32Fnv1: ${testhashu32Fnv1}, testhashs64Fnv1: ${testhashs64Fnv1}, testhashu64Fnv1: ${testhashu64Fnv1}, testhashs32Fnv1a: ${testhashs32Fnv1a}, testhashu32Fnv1a: ${testhashu32Fnv1a}, testhashs64Fnv1a: ${testhashs64Fnv1a}, testhashu64Fnv1a: ${testhashu64Fnv1a}, testarrayofbools: ${testarrayofbools}, testf: ${testf}, testf2: ${testf2}, testf3: ${testf3}, testarrayofstring2: ${testarrayofstring2}, testarrayofsortedstruct: ${testarrayofsortedstruct}, flex: ${flex}, test5: ${test5}, vectorOfLongs: ${vectorOfLongs}, vectorOfDoubles: ${vectorOfDoubles}, parentNamespaceTest: ${parentNamespaceTest}, vectorOfReferrables: ${vectorOfReferrables}, singleWeakReference: ${singleWeakReference}, vectorOfWeakReferences: ${vectorOfWeakReferences}, vectorOfStrongReferrables: ${vectorOfStrongReferrables}, coOwningReference: ${coOwningReference}, vectorOfCoOwningReferences: ${vectorOfCoOwningReferences}, nonOwningReference: ${nonOwningReference}, vectorOfNonOwningReferences: ${vectorOfNonOwningReferences}, anyUniqueType: ${anyUniqueType}, anyUnique: ${anyUnique}, anyAmbiguousType: ${anyAmbiguousType}, anyAmbiguous: ${anyAmbiguous}, vectorOfEnums: ${vectorOfEnums}, signedEnum: ${signedEnum}, testrequirednestedflatbuffer: ${testrequirednestedflatbuffer}, scalarKeySortedTables: ${scalarKeySortedTables}, nativeInline: ${nativeInline}, longEnumNonEnumDefault: ${longEnumNonEnumDefault}, longEnumNormalDefault: ${longEnumNormalDefault}, nanDefault: ${nanDefault}, infDefault: ${infDefault}, positiveInfDefault: ${positiveInfDefault}, infinityDefault: ${infinityDefault}, positiveInfinityDefault: ${positiveInfinityDefault}, negativeInfDefault: ${negativeInfDefault}, negativeInfinityDefault: ${negativeInfinityDefault}, doubleInfDefault: ${doubleInfDefault}}';
}
}
@@ -1578,7 +1618,7 @@
final fb.Builder fbBuilder;
void begin() {
- fbBuilder.startTable(54);
+ fbBuilder.startTable(62);
}
int addPos(int offset) {
@@ -1793,6 +1833,38 @@
fbBuilder.addUint64(53, longEnumNormalDefault?.value);
return fbBuilder.offset;
}
+ int addNanDefault(double? nanDefault) {
+ fbBuilder.addFloat32(54, nanDefault);
+ return fbBuilder.offset;
+ }
+ int addInfDefault(double? infDefault) {
+ fbBuilder.addFloat32(55, infDefault);
+ return fbBuilder.offset;
+ }
+ int addPositiveInfDefault(double? positiveInfDefault) {
+ fbBuilder.addFloat32(56, positiveInfDefault);
+ return fbBuilder.offset;
+ }
+ int addInfinityDefault(double? infinityDefault) {
+ fbBuilder.addFloat32(57, infinityDefault);
+ return fbBuilder.offset;
+ }
+ int addPositiveInfinityDefault(double? positiveInfinityDefault) {
+ fbBuilder.addFloat32(58, positiveInfinityDefault);
+ return fbBuilder.offset;
+ }
+ int addNegativeInfDefault(double? negativeInfDefault) {
+ fbBuilder.addFloat32(59, negativeInfDefault);
+ return fbBuilder.offset;
+ }
+ int addNegativeInfinityDefault(double? negativeInfinityDefault) {
+ fbBuilder.addFloat32(60, negativeInfinityDefault);
+ return fbBuilder.offset;
+ }
+ int addDoubleInfDefault(double? doubleInfDefault) {
+ fbBuilder.addFloat64(61, doubleInfDefault);
+ return fbBuilder.offset;
+ }
int finish() {
return fbBuilder.endTable();
@@ -1853,6 +1925,14 @@
final TestObjectBuilder? _nativeInline;
final LongEnum? _longEnumNonEnumDefault;
final LongEnum? _longEnumNormalDefault;
+ final double? _nanDefault;
+ final double? _infDefault;
+ final double? _positiveInfDefault;
+ final double? _infinityDefault;
+ final double? _positiveInfinityDefault;
+ final double? _negativeInfDefault;
+ final double? _negativeInfinityDefault;
+ final double? _doubleInfDefault;
MonsterObjectBuilder({
Vec3ObjectBuilder? pos,
@@ -1908,6 +1988,14 @@
TestObjectBuilder? nativeInline,
LongEnum? longEnumNonEnumDefault,
LongEnum? longEnumNormalDefault,
+ double? nanDefault,
+ double? infDefault,
+ double? positiveInfDefault,
+ double? infinityDefault,
+ double? positiveInfinityDefault,
+ double? negativeInfDefault,
+ double? negativeInfinityDefault,
+ double? doubleInfDefault,
})
: _pos = pos,
_mana = mana,
@@ -1961,7 +2049,15 @@
_scalarKeySortedTables = scalarKeySortedTables,
_nativeInline = nativeInline,
_longEnumNonEnumDefault = longEnumNonEnumDefault,
- _longEnumNormalDefault = longEnumNormalDefault;
+ _longEnumNormalDefault = longEnumNormalDefault,
+ _nanDefault = nanDefault,
+ _infDefault = infDefault,
+ _positiveInfDefault = positiveInfDefault,
+ _infinityDefault = infinityDefault,
+ _positiveInfinityDefault = positiveInfinityDefault,
+ _negativeInfDefault = negativeInfDefault,
+ _negativeInfinityDefault = negativeInfinityDefault,
+ _doubleInfDefault = doubleInfDefault;
/// Finish building, and store into the [fbBuilder].
@override
@@ -2014,7 +2110,7 @@
: fbBuilder.writeListUint8(_testrequirednestedflatbuffer!);
final int? scalarKeySortedTablesOffset = _scalarKeySortedTables == null ? null
: fbBuilder.writeList(_scalarKeySortedTables!.map((b) => b.getOrCreateOffset(fbBuilder)).toList());
- fbBuilder.startTable(54);
+ fbBuilder.startTable(62);
if (_pos != null) {
fbBuilder.addStruct(0, _pos!.finish(fbBuilder));
}
@@ -2072,6 +2168,14 @@
}
fbBuilder.addUint64(52, _longEnumNonEnumDefault?.value);
fbBuilder.addUint64(53, _longEnumNormalDefault?.value);
+ fbBuilder.addFloat32(54, _nanDefault);
+ fbBuilder.addFloat32(55, _infDefault);
+ fbBuilder.addFloat32(56, _positiveInfDefault);
+ fbBuilder.addFloat32(57, _infinityDefault);
+ fbBuilder.addFloat32(58, _positiveInfinityDefault);
+ fbBuilder.addFloat32(59, _negativeInfDefault);
+ fbBuilder.addFloat32(60, _negativeInfinityDefault);
+ fbBuilder.addFloat64(61, _doubleInfDefault);
return fbBuilder.endTable();
}