Skip to content

Commit

Permalink
FlatBuffers Version 22.10.25 (#7604)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaileychess authored Oct 26, 2022
1 parent 5b3fadc commit a54ca1e
Show file tree
Hide file tree
Showing 158 changed files with 329 additions and 250 deletions.
8 changes: 6 additions & 2 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.

## 22.10.25 (Oct 25 2002)

* Added Nim language support with generator and runtime libraries (#7534).

## 22.9.29 (Sept 29 2022)

* Rust soundness fixes to avoid the crate from bing labelled unsafe (#7518).
Expand All @@ -27,8 +31,8 @@ necessarily listed.
`AlignOf()` for structs (#7520).

* C# has an
[offical Nuget package](https://www.nuget.org/packages/Google.FlatBuffers) now
(#7496).
[official Nuget package](https://www.nuget.org/packages/Google.FlatBuffers)
now (#7496).

## 2.0.8 (Aug 29 2022)

Expand Down
4 changes: 2 additions & 2 deletions CMake/Version.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(VERSION_MAJOR 22)
set(VERSION_MINOR 9)
set(VERSION_PATCH 29)
set(VERSION_MINOR 10)
set(VERSION_PATCH 25)
set(VERSION_COMMIT 0)

find_program(GIT 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 = '22.9.29'
s.version = '22.10.25'
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 @@ -36,7 +36,7 @@ class Animal : Table() {
return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u
}
companion object {
fun validateVersion() = Constants.FLATBUFFERS_22_9_29()
fun validateVersion() = Constants.FLATBUFFERS_22_10_25()
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: 22.9.29
version: 22.10.25
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_22_9_29() }
static func validateVersion() { FlatBuffersVersion_22_10_25() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Table

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

public struct models_HelloRequest: FlatBufferObject, Verifiable {

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

Expand Down
4 changes: 2 additions & 2 deletions include/flatbuffers/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@
#endif // !defined(FLATBUFFERS_LITTLEENDIAN)

#define FLATBUFFERS_VERSION_MAJOR 22
#define FLATBUFFERS_VERSION_MINOR 9
#define FLATBUFFERS_VERSION_REVISION 29
#define FLATBUFFERS_VERSION_MINOR 10
#define FLATBUFFERS_VERSION_REVISION 25
#define FLATBUFFERS_STRING_EXPAND(X) #X
#define FLATBUFFERS_STRING(X) FLATBUFFERS_STRING_EXPAND(X)
namespace flatbuffers {
Expand Down
4 changes: 2 additions & 2 deletions include/flatbuffers/reflection_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Ensure the included flatbuffers.h is the same version as when this file was
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 22 &&
FLATBUFFERS_VERSION_MINOR == 9 &&
FLATBUFFERS_VERSION_REVISION == 29,
FLATBUFFERS_VERSION_MINOR == 10 &&
FLATBUFFERS_VERSION_REVISION == 25,
"Non-compatible flatbuffers version included");

namespace reflection {
Expand Down
33 changes: 16 additions & 17 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.flatbuffers</groupId>
<artifactId>flatbuffers-java</artifactId>
<version>22.9.29</version>
<version>22.10.25</version>
<packaging>bundle</packaging>
<name>FlatBuffers Java API</name>
<description>
Expand Down Expand Up @@ -58,17 +58,17 @@
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>8</release>
<testExcludes>
<testExclude>MyGame/Example/MonsterStorageGrpc.java</testExclude>
<testExclude>MyGame/OtherNameSpace/TableBT.java</testExclude>
</testExcludes>
</configuration>
<version>3.8.1</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>8</release>
<testExcludes>
<testExclude>MyGame/Example/MonsterStorageGrpc.java</testExclude>
<testExclude>MyGame/OtherNameSpace/TableBT.java</testExclude>
</testExcludes>
</configuration>
<version>3.8.1</version>
</plugin>
</plugins>
</build>
<profiles>
Expand Down Expand Up @@ -147,10 +147,10 @@
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
Expand All @@ -171,4 +171,3 @@
</profile>
</profiles>
</project>

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_22_9_29() {}
public static void FLATBUFFERS_22_10_25() {}
}

/// @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_22_9_29() {}
public static void FLATBUFFERS_22_10_25() {}
}
}
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>22.9.29</PackageVersion>
<PackageVersion>22.10.25</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": "22.9.29",
"version": "22.10.25",
"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"22.9.29"
__version__ = u"22.10.25"
4 changes: 2 additions & 2 deletions samples/monster_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Ensure the included flatbuffers.h is the same version as when this file was
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 22 &&
FLATBUFFERS_VERSION_MINOR == 9 &&
FLATBUFFERS_VERSION_REVISION == 29,
FLATBUFFERS_VERSION_MINOR == 10 &&
FLATBUFFERS_VERSION_REVISION == 25,
"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 @@ -31,7 +31,7 @@ public enum MyGame_Sample_Equipment: UInt8, Enum {

public struct MyGame_Sample_Vec3: NativeStruct {

static func validateVersion() { FlatBuffersVersion_22_9_29() }
static func validateVersion() { FlatBuffersVersion_22_10_25() }

private var _x: Float32
private var _y: Float32
Expand All @@ -56,7 +56,7 @@ public struct MyGame_Sample_Vec3: NativeStruct {

public struct MyGame_Sample_Vec3_Mutable: FlatBufferObject {

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

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

public struct MyGame_Sample_Monster: FlatBufferObject {

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

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

public struct MyGame_Sample_Weapon: FlatBufferObject {

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

Expand Down
76 changes: 76 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@

printf -v year '%(%y)T' -1
printf -v month '%(%m)T' -1
printf -v day '%(%d)T' -1

version="$year.$month.$day"
version_underscore="$year\_$month\_$day"

echo "Setting Flatbuffers Version to: $version"

echo "Updating include/flatbuffers/base.h..."
sed -i \
-e "s/\(#define FLATBUFFERS_VERSION_MAJOR \).*/\1$year/" \
-e "s/\(#define FLATBUFFERS_VERSION_MINOR \).*/\1$month/" \
-e "s/\(#define FLATBUFFERS_VERSION_REVISION \).*/\1$day/" \
include/flatbuffers/base.h

echo "Updating CMake\Version.cmake..."
sed -i \
-e "s/\(set(VERSION_MAJOR \).*/\1$year)/" \
-e "s/\(set(VERSION_MINOR \).*/\1$month)/" \
-e "s/\(set(VERSION_PATCH \).*/\1$day)/" \
CMake/Version.cmake

echo "Updating include/flatbuffers/reflection_generated.h..."
echo "Updating tests/evolution_test/evolution_v1_generated.h..."
echo "Updating tests/evolution_test/evolution_v1_generated.h..."
sed -i \
-e "s/\(FLATBUFFERS_VERSION_MAJOR == \)[0-9]*\(.*\)/\1$year\2/" \
-e "s/\(FLATBUFFERS_VERSION_MINOR == \)[0-9]*\(.*\)/\1$month\2/" \
-e "s/\(FLATBUFFERS_VERSION_REVISION == \)[0-9]*\(.*\)/\1$day\2/" \
include/flatbuffers/reflection_generated.h \
tests/evolution_test/evolution_v1_generated.h \
tests/evolution_test/evolution_v2_generated.h

echo "Updating java/pom.xml..."
xmlstarlet edit --inplace -N s=http://maven.apache.org/POM/4.0.0 \
--update '//s:project/s:version' --value $version \
java/pom.xml

echo "Updating package.json..."
sed -i \
-e "s/\(\"version\": \).*/\1\"$version\",/" \
package.json

echo "Updating net/FlatBuffers/Google.FlatBuffers.csproj..."
sed -i \
-e "s/\(<PackageVersion>\).*\(<\/PackageVersion>\)/\1$version\2/" \
net/FlatBuffers/Google.FlatBuffers.csproj

echo "Updating dart/pubspec.yaml..."
sed -i \
-e "s/\(version: \).*/\1$version/" \
dart/pubspec.yaml

echo "Updating python/flatbuffers/_version.py..."
sed -i \
-e "s/\(__version__ = u\).*/\1\"$version\"/" \
python/flatbuffers/_version.py

echo "Updating FlatBuffers.podspec..."
sed -i \
-e "s/\(s.version\s*= \).*/\1'$version'/" \
FlatBuffers.podspec

echo "Updating FlatBuffersVersion_X_X_X() version check...."
grep -rl 'FlatBuffersVersion_' * --exclude=release.sh | xargs -i@ \
sed -i \
-e "s/\(FlatBuffersVersion_\).*()/\1$version_underscore()/g" \
@

echo "Updating FLATBUFFERS_X_X_X() version check...."
grep -rl 'FLATBUFFERS_\d*' * --exclude=release.sh | xargs -i@ \
sed -i \
-e "s/\(FLATBUFFERS_\)[0-9]\{2\}.*()/\1$version_underscore()/g" \
@
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_22_9_29(); ";
code += "FLATBUFFERS_22_10_25(); ";
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 @@ -669,7 +669,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_22_9_29(); ";
code += "FLATBUFFERS_22_10_25(); ";
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 @@ -505,7 +505,7 @@ class KotlinGenerator : public BaseGenerator {
// runtime.
GenerateFunOneLine(
writer, "validateVersion", "", "",
[&]() { writer += "Constants.FLATBUFFERS_22_9_29()"; },
[&]() { writer += "Constants.FLATBUFFERS_22_10_25()"; },
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 @@ -1874,7 +1874,7 @@ class SwiftGenerator : public BaseGenerator {
}

std::string ValidateFunc() {
return "static func validateVersion() { FlatBuffersVersion_22_9_29() }";
return "static func validateVersion() { FlatBuffersVersion_22_10_25() }";
}

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_22_9_29() {}
public func FlatBuffersVersion_22_10_25() {}
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: 22.9.29
flatc version: 22.10.25
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 @@ -9,7 +9,7 @@

@SuppressWarnings("unused")
public final class LongFloatEntry extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_22_9_29(); }
public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_25(); }
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 @@ -32,7 +32,7 @@ class LongFloatEntry : Table() {
return (val_1 - val_2).sign
}
companion object {
fun validateVersion() = Constants.FLATBUFFERS_22_9_29()
fun validateVersion() = Constants.FLATBUFFERS_22_10_25()
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 @@ -9,7 +9,7 @@

@SuppressWarnings("unused")
public final class LongFloatMap extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_22_9_29(); }
public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_25(); }
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
Loading

0 comments on commit a54ca1e

Please sign in to comment.