Skip to content

Commit

Permalink
Flatbuffers Version 23.1.20 (#7794)
Browse files Browse the repository at this point in the history
* Flatbuffers Version 23.1.20

* Fix warnings

* Fix warnings
  • Loading branch information
le-michael authored Jan 21, 2023
1 parent 991b39e commit 1703662
Show file tree
Hide file tree
Showing 164 changed files with 224 additions and 220 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All major or breaking changes will be documented in this file, as well as any
new features that should be highlighted. Minor fixes or improvements are not
necessarily listed.

## [23.1.20 (Jan 20 2023)](https://github.com/google/flatbuffers/releases/tag/v23.1.20)

* Removed go.mod files after some versioning issues were being report ([#7780](https://github.com/google/flatbuffers/issues/7780)).

## [23.1.4 (Jan 4 2023)](https://github.com/google/flatbuffers/releases/tag/v23.1.4)

* Major release! Just kidding, we are continuing the
Expand Down
2 changes: 1 addition & 1 deletion CMake/Version.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(VERSION_MAJOR 23)
set(VERSION_MINOR 1)
set(VERSION_PATCH 4)
set(VERSION_PATCH 20)
set(VERSION_COMMIT 0)

if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
Expand Down
2 changes: 1 addition & 1 deletion FlatBuffers.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FlatBuffers'
s.version = '23.1.4'
s.version = '23.1.20'
s.summary = 'FlatBuffers: Memory Efficient Serialization Library'

s.description = "FlatBuffers is a cross platform serialization library architected for
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/java/generated/com/fbs/app/Animal.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Animal : Table() {
return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u
}
companion object {
fun validateVersion() = Constants.FLATBUFFERS_23_1_4()
fun validateVersion() = Constants.FLATBUFFERS_23_1_20()
fun getRootAsAnimal(_bb: ByteBuffer): Animal = getRootAsAnimal(_bb, Animal())
fun getRootAsAnimal(_bb: ByteBuffer, obj: Animal): Animal {
_bb.order(ByteOrder.LITTLE_ENDIAN)
Expand Down
2 changes: 1 addition & 1 deletion dart/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: flat_buffers
version: 23.1.4
version: 23.1.20
description: FlatBuffers reading and writing library for Dart. Based on original work by Konstantin Scheglov and Paul Berry of the Dart SDK team.
homepage: https://github.com/google/flatbuffers
documentation: https://google.github.io/flatbuffers/index.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import FlatBuffers

public struct models_HelloReply: FlatBufferObject, Verifiable {

static func validateVersion() { FlatBuffersVersion_23_1_4() }
static func validateVersion() { FlatBuffersVersion_23_1_20() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Table

Expand Down Expand Up @@ -53,7 +53,7 @@ extension models_HelloReply: Encodable {

public struct models_HelloRequest: FlatBufferObject, Verifiable {

static func validateVersion() { FlatBuffersVersion_23_1_4() }
static func validateVersion() { FlatBuffersVersion_23_1_20() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Table

Expand Down
2 changes: 1 addition & 1 deletion include/flatbuffers/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@

#define FLATBUFFERS_VERSION_MAJOR 23
#define FLATBUFFERS_VERSION_MINOR 1
#define FLATBUFFERS_VERSION_REVISION 4
#define FLATBUFFERS_VERSION_REVISION 20
#define FLATBUFFERS_STRING_EXPAND(X) #X
#define FLATBUFFERS_STRING(X) FLATBUFFERS_STRING_EXPAND(X)
namespace flatbuffers {
Expand Down
2 changes: 1 addition & 1 deletion include/flatbuffers/reflection_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 23 &&
FLATBUFFERS_VERSION_MINOR == 1 &&
FLATBUFFERS_VERSION_REVISION == 4,
FLATBUFFERS_VERSION_REVISION == 20,
"Non-compatible flatbuffers version included");

namespace reflection {
Expand Down
2 changes: 1 addition & 1 deletion java/src/main/java/com/google/flatbuffers/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class Constants {
Changes to the Java implementation need to be sure to change
the version here and in the code generator on every possible
incompatible change */
public static void FLATBUFFERS_23_1_4() {}
public static void FLATBUFFERS_23_1_20() {}
}

/// @endcond
2 changes: 1 addition & 1 deletion net/FlatBuffers/FlatBufferConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ the runtime and generated code are modified in sync.
Changes to the C# implementation need to be sure to change
the version here and in the code generator on every possible
incompatible change */
public static void FLATBUFFERS_23_1_4() {}
public static void FLATBUFFERS_23_1_20() {}
}
}
2 changes: 1 addition & 1 deletion net/FlatBuffers/Google.FlatBuffers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0;net46</TargetFrameworks>
<Description>A cross-platform memory efficient serialization library</Description>
<PackageVersion>23.1.4</PackageVersion>
<PackageVersion>23.1.20</PackageVersion>
<Authors>Google LLC</Authors>
<PackageProjectUrl>https://github.com/google/flatbuffers</PackageProjectUrl>
<RepositoryUrl>https://github.com/google/flatbuffers</RepositoryUrl>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flatbuffers",
"version": "23.1.4",
"version": "23.1.20",
"description": "Memory Efficient Serialization Library",
"files": [
"js/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion python/flatbuffers/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

# Placeholder, to be updated during the release process
# by the setup.py
__version__ = u"23.1.4"
__version__ = u"23.1.20"
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

setup(
name='flatbuffers',
version='23.1.4',
version='23.1.20',
license='Apache 2.0',
license_files='../LICENSE.txt',
author='Derek Bailey',
Expand Down
2 changes: 1 addition & 1 deletion rust/flatbuffers/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "flatbuffers"
version = "23.1.4"
version = "23.1.20"
edition = "2018"
authors = ["Robert Winslow <[email protected]>", "FlatBuffers Maintainers"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion samples/monster_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 23 &&
FLATBUFFERS_VERSION_MINOR == 1 &&
FLATBUFFERS_VERSION_REVISION == 4,
FLATBUFFERS_VERSION_REVISION == 20,
"Non-compatible flatbuffers version included");

namespace MyGame {
Expand Down
8 changes: 4 additions & 4 deletions samples/monster_generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public enum MyGame_Sample_Equipment: UInt8, UnionEnum {

public struct MyGame_Sample_Vec3: NativeStruct, Verifiable, FlatbuffersInitializable {

static func validateVersion() { FlatBuffersVersion_23_1_4() }
static func validateVersion() { FlatBuffersVersion_23_1_20() }

private var _x: Float32
private var _y: Float32
Expand Down Expand Up @@ -72,7 +72,7 @@ public struct MyGame_Sample_Vec3: NativeStruct, Verifiable, FlatbuffersInitializ

public struct MyGame_Sample_Vec3_Mutable: FlatBufferObject {

static func validateVersion() { FlatBuffersVersion_23_1_4() }
static func validateVersion() { FlatBuffersVersion_23_1_20() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Struct

Expand All @@ -88,7 +88,7 @@ public struct MyGame_Sample_Vec3_Mutable: FlatBufferObject {

public struct MyGame_Sample_Monster: FlatBufferObject, Verifiable {

static func validateVersion() { FlatBuffersVersion_23_1_4() }
static func validateVersion() { FlatBuffersVersion_23_1_20() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Table

Expand Down Expand Up @@ -200,7 +200,7 @@ public struct MyGame_Sample_Monster: FlatBufferObject, Verifiable {

public struct MyGame_Sample_Weapon: FlatBufferObject, Verifiable {

static func validateVersion() { FlatBuffersVersion_23_1_4() }
static func validateVersion() { FlatBuffersVersion_23_1_20() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Table

Expand Down
6 changes: 3 additions & 3 deletions src/annotated_binary_text_gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ static std::string GenerateDocumentation(const BinaryRegion &region,

{
std::stringstream ss;
ss << std::setw(output_config.largest_type_string) << std::left;
ss << std::setw(static_cast<int>(output_config.largest_type_string)) << std::left;
ss << GenerateTypeString(region);
s += ss.str();
}
Expand All @@ -293,15 +293,15 @@ static std::string GenerateDocumentation(const BinaryRegion &region,
const std::string value = ToValueString(region, binary, output_config);

std::stringstream ss;
ss << std::setw(output_config.largest_value_string) << std::left;
ss << std::setw(static_cast<int>(output_config.largest_value_string)) << std::left;
ss << value.substr(0, output_config.max_bytes_per_line);
s += ss.str();

continuation.value =
value.substr(std::min(output_config.max_bytes_per_line, value.size()));
} else {
std::stringstream ss;
ss << std::setw(output_config.largest_value_string) << std::left;
ss << std::setw(static_cast<int>(output_config.largest_value_string)) << std::left;
ss << ToValueString(region, binary, output_config);
s += ss.str();
}
Expand Down
4 changes: 2 additions & 2 deletions src/binary_annotator.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ enum class BinaryRegionType {
template<typename T>
static inline std::string ToHex(T i, size_t width = sizeof(T)) {
std::stringstream stream;
stream << std::hex << std::uppercase << std::setfill('0') << std::setw(width)
stream << std::hex << std::uppercase << std::setfill('0') << std::setw(static_cast<int>(width))
<< i;
return stream.str();
}

// Specialized version for uint8_t that don't work well with std::hex.
static inline std::string ToHex(uint8_t i) {
return ToHex(static_cast<int>(i), 2);
return ToHex<int>(static_cast<int>(i), 2);
}

enum class BinaryRegionStatus {
Expand Down
2 changes: 1 addition & 1 deletion src/idl_gen_csharp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ class CSharpGenerator : public BaseGenerator {
// Force compile time error if not using the same version runtime.
code += " public static void ValidateVersion() {";
code += " FlatBufferConstants.";
code += "FLATBUFFERS_23_1_4(); ";
code += "FLATBUFFERS_23_1_20(); ";
code += "}\n";

// Generate a special accessor for the table that when used as the root
Expand Down
2 changes: 1 addition & 1 deletion src/idl_gen_java.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ class JavaGenerator : public BaseGenerator {
// Force compile time error if not using the same version runtime.
code += " public static void ValidateVersion() {";
code += " Constants.";
code += "FLATBUFFERS_23_1_4(); ";
code += "FLATBUFFERS_23_1_20(); ";
code += "}\n";

// Generate a special accessor for the table that when used as the root
Expand Down
2 changes: 1 addition & 1 deletion src/idl_gen_kotlin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ class KotlinGenerator : public BaseGenerator {
// runtime.
GenerateFunOneLine(
writer, "validateVersion", "", "",
[&]() { writer += "Constants.FLATBUFFERS_23_1_4()"; },
[&]() { writer += "Constants.FLATBUFFERS_23_1_20()"; },
options.gen_jvmstatic);

GenerateGetRootAsAccessors(namer_.Type(struct_def), writer, options);
Expand Down
2 changes: 1 addition & 1 deletion src/idl_gen_swift.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ class SwiftGenerator : public BaseGenerator {
}

std::string ValidateFunc() {
return "static func validateVersion() { FlatBuffersVersion_23_1_4() }";
return "static func validateVersion() { FlatBuffersVersion_23_1_20() }";
}

std::string GenType(const Type &type,
Expand Down
2 changes: 1 addition & 1 deletion swift/Sources/FlatBuffers/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ extension UInt64: Scalar, Verifiable {
public typealias NumericValue = UInt64
}

public func FlatBuffersVersion_23_1_4() {}
public func FlatBuffersVersion_23_1_20() {}
2 changes: 1 addition & 1 deletion tests/Abc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
flatc version: 23.1.4
flatc version: 23.1.20
Declared by :
]#
Expand Down
2 changes: 1 addition & 1 deletion tests/DictionaryLookup/LongFloatEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

@SuppressWarnings("unused")
public final class LongFloatEntry extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_23_1_4(); }
public static void ValidateVersion() { Constants.FLATBUFFERS_23_1_20(); }
public static LongFloatEntry getRootAsLongFloatEntry(ByteBuffer _bb) { return getRootAsLongFloatEntry(_bb, new LongFloatEntry()); }
public static LongFloatEntry getRootAsLongFloatEntry(ByteBuffer _bb, LongFloatEntry obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
Expand Down
2 changes: 1 addition & 1 deletion tests/DictionaryLookup/LongFloatEntry.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class LongFloatEntry : Table() {
return (val_1 - val_2).sign
}
companion object {
fun validateVersion() = Constants.FLATBUFFERS_23_1_4()
fun validateVersion() = Constants.FLATBUFFERS_23_1_20()
fun getRootAsLongFloatEntry(_bb: ByteBuffer): LongFloatEntry = getRootAsLongFloatEntry(_bb, LongFloatEntry())
fun getRootAsLongFloatEntry(_bb: ByteBuffer, obj: LongFloatEntry): LongFloatEntry {
_bb.order(ByteOrder.LITTLE_ENDIAN)
Expand Down
2 changes: 1 addition & 1 deletion tests/DictionaryLookup/LongFloatMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

@SuppressWarnings("unused")
public final class LongFloatMap extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_23_1_4(); }
public static void ValidateVersion() { Constants.FLATBUFFERS_23_1_20(); }
public static LongFloatMap getRootAsLongFloatMap(ByteBuffer _bb) { return getRootAsLongFloatMap(_bb, new LongFloatMap()); }
public static LongFloatMap getRootAsLongFloatMap(ByteBuffer _bb, LongFloatMap obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
Expand Down
2 changes: 1 addition & 1 deletion tests/DictionaryLookup/LongFloatMap.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class LongFloatMap : Table() {
}
}
companion object {
fun validateVersion() = Constants.FLATBUFFERS_23_1_4()
fun validateVersion() = Constants.FLATBUFFERS_23_1_20()
fun getRootAsLongFloatMap(_bb: ByteBuffer): LongFloatMap = getRootAsLongFloatMap(_bb, LongFloatMap())
fun getRootAsLongFloatMap(_bb: ByteBuffer, obj: LongFloatMap): LongFloatMap {
_bb.order(ByteOrder.LITTLE_ENDIAN)
Expand Down
2 changes: 1 addition & 1 deletion tests/KeywordTest/KeywordsInTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public struct KeywordsInTable : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_23_1_4(); }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_23_1_20(); }
public static KeywordsInTable GetRootAsKeywordsInTable(ByteBuffer _bb) { return GetRootAsKeywordsInTable(_bb, new KeywordsInTable()); }
public static KeywordsInTable GetRootAsKeywordsInTable(ByteBuffer _bb, KeywordsInTable obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
Expand Down
2 changes: 1 addition & 1 deletion tests/KeywordTest/Table2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public struct Table2 : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_23_1_4(); }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_23_1_20(); }
public static Table2 GetRootAsTable2(ByteBuffer _bb) { return GetRootAsTable2(_bb, new Table2()); }
public static Table2 GetRootAsTable2(ByteBuffer _bb, Table2 obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
Expand Down
2 changes: 1 addition & 1 deletion tests/MoreDefaults.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
flatc version: 23.1.4
flatc version: 23.1.20
Declared by :
]#
Expand Down
2 changes: 1 addition & 1 deletion tests/MyGame/Example/Ability.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
flatc version: 23.1.4
flatc version: 23.1.20
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Expand Down
2 changes: 1 addition & 1 deletion tests/MyGame/Example/Ability.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
flatc version: 23.1.4
flatc version: 23.1.20
Declared by :
Rooting type : MyGame.Example.Monster ()
Expand Down
2 changes: 1 addition & 1 deletion tests/MyGame/Example/Any.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
flatc version: 23.1.4
flatc version: 23.1.20
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Expand Down
2 changes: 1 addition & 1 deletion tests/MyGame/Example/Any.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
flatc version: 23.1.4
flatc version: 23.1.20
Declared by :
Rooting type : MyGame.Example.Monster ()
Expand Down
2 changes: 1 addition & 1 deletion tests/MyGame/Example/AnyAmbiguousAliases.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
flatc version: 23.1.4
flatc version: 23.1.20
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Expand Down
2 changes: 1 addition & 1 deletion tests/MyGame/Example/AnyAmbiguousAliases.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
flatc version: 23.1.4
flatc version: 23.1.20
Declared by :
Rooting type : MyGame.Example.Monster ()
Expand Down
Loading

0 comments on commit 1703662

Please sign in to comment.