Bump flatbuffers to v24.3.25 version (#6968)
This commit is contained in:
committed by
GitHub
parent
7436835244
commit
825132eec7
+14
@@ -0,0 +1,14 @@
|
||||
filegroup(
|
||||
name = "distribution",
|
||||
srcs = [
|
||||
"BUILD.bazel",
|
||||
"reflection.fbs",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "reflection_fbs_schema",
|
||||
srcs = ["reflection.fbs"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
@@ -1,18 +0,0 @@
|
||||
:: Copyright 2015 Google Inc. All rights reserved.
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
|
||||
set buildtype=Release
|
||||
if "%1"=="-b" set buildtype=%2
|
||||
|
||||
..\%buildtype%\flatc.exe --cpp --no-prefix -o ../include/flatbuffers reflection.fbs || exit /b 1
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright 2016 Google Inc. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
set -e
|
||||
|
||||
../flatc -c --no-prefix -o ../include/flatbuffers reflection.fbs
|
||||
+46
-3
@@ -24,17 +24,26 @@ enum BaseType : byte {
|
||||
Vector,
|
||||
Obj, // Used for tables & structs.
|
||||
Union,
|
||||
Array
|
||||
Array,
|
||||
Vector64,
|
||||
|
||||
// Add any new type above this value.
|
||||
MaxBaseType
|
||||
}
|
||||
|
||||
table Type {
|
||||
base_type:BaseType;
|
||||
element:BaseType = None; // Only if base_type == Vector
|
||||
element:BaseType = None; // Only if base_type == Vector
|
||||
// or base_type == Array.
|
||||
index:int = -1; // If base_type == Object, index into "objects" below.
|
||||
// If base_type == Union, UnionType, or integral derived
|
||||
// from an enum, index into "enums" below.
|
||||
// If base_type == Vector && element == Union or UnionType.
|
||||
fixed_length:uint16 = 0; // Only if base_type == Array.
|
||||
/// The size (octets) of the `base_type` field.
|
||||
base_size:uint = 4; // 4 Is a common size due to offsets being that size.
|
||||
/// The size (octets) of the `element` field, if present.
|
||||
element_size:uint = 0;
|
||||
}
|
||||
|
||||
table KeyValue {
|
||||
@@ -45,9 +54,10 @@ table KeyValue {
|
||||
table EnumVal {
|
||||
name:string (required);
|
||||
value:long (key);
|
||||
object:Object; // Will be deprecated in favor of union_type in the future.
|
||||
object:Object (deprecated);
|
||||
union_type:Type;
|
||||
documentation:[string];
|
||||
attributes:[KeyValue];
|
||||
}
|
||||
|
||||
table Enum {
|
||||
@@ -57,6 +67,8 @@ table Enum {
|
||||
underlying_type:Type (required);
|
||||
attributes:[KeyValue];
|
||||
documentation:[string];
|
||||
/// File that this Enum is declared in.
|
||||
declaration_file: string;
|
||||
}
|
||||
|
||||
table Field {
|
||||
@@ -71,6 +83,11 @@ table Field {
|
||||
key:bool = false;
|
||||
attributes:[KeyValue];
|
||||
documentation:[string];
|
||||
optional:bool = false;
|
||||
/// Number of padding octets to always add after this field. Structs only.
|
||||
padding:uint16 = 0;
|
||||
/// If the field uses 64-bit offsets.
|
||||
offset64:bool = false;
|
||||
}
|
||||
|
||||
table Object { // Used for both tables and structs.
|
||||
@@ -81,6 +98,8 @@ table Object { // Used for both tables and structs.
|
||||
bytesize:int; // For structs.
|
||||
attributes:[KeyValue];
|
||||
documentation:[string];
|
||||
/// File that this Object is declared in.
|
||||
declaration_file: string;
|
||||
}
|
||||
|
||||
table RPCCall {
|
||||
@@ -96,6 +115,26 @@ table Service {
|
||||
calls:[RPCCall];
|
||||
attributes:[KeyValue];
|
||||
documentation:[string];
|
||||
/// File that this Service is declared in.
|
||||
declaration_file: string;
|
||||
}
|
||||
|
||||
/// New schema language features that are not supported by old code generators.
|
||||
enum AdvancedFeatures : ulong (bit_flags) {
|
||||
AdvancedArrayFeatures,
|
||||
AdvancedUnionFeatures,
|
||||
OptionalScalars,
|
||||
DefaultVectorsAndStrings,
|
||||
}
|
||||
|
||||
/// File specific information.
|
||||
/// Symbols declared within a file may be recovered by iterating over all
|
||||
/// symbols and examining the `declaration_file` field.
|
||||
table SchemaFile {
|
||||
/// Filename, relative to project root.
|
||||
filename:string (required, key);
|
||||
/// Names of included files, relative to project root.
|
||||
included_filenames:[string];
|
||||
}
|
||||
|
||||
table Schema {
|
||||
@@ -105,6 +144,10 @@ table Schema {
|
||||
file_ext:string;
|
||||
root_table:Object;
|
||||
services:[Service]; // Sorted.
|
||||
advanced_features:AdvancedFeatures;
|
||||
/// All the files used in this compilation. Files are relative to where
|
||||
/// flatc was invoked.
|
||||
fbs_files:[SchemaFile]; // Sorted.
|
||||
}
|
||||
|
||||
root_type Schema;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
load("//:typescript.bzl", "flatbuffer_ts_library")
|
||||
|
||||
genrule(
|
||||
name = "copy_schema_to_folder",
|
||||
srcs = ["//reflection:reflection_fbs_schema"],
|
||||
outs = ["reflection.fbs"],
|
||||
cmd = "cp $< $@",
|
||||
)
|
||||
|
||||
flatbuffer_ts_library(
|
||||
name = "reflection_ts_fbs",
|
||||
srcs = [":reflection.fbs"],
|
||||
gen_reflections = True,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
Reference in New Issue
Block a user