Skip to content

Commit 9118dee

Browse files
authored
Merge branch 'master' into fix/java_grpc_package_prefix
2 parents 6256b6d + 7e16302 commit 9118dee

File tree

236 files changed

+5796
-5096
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+5796
-5096
lines changed

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Default owner
2+
* @aardappel @dbaileychess derekbailey@google.com
3+
4+
# Prevent modification of this file
5+
.github/CODEOWNERS @dbaileychess derekbailey@google.com

.github/workflows/build.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -390,17 +390,10 @@ jobs:
390390

391391
build-kotlin-macos:
392392
name: Build Kotlin MacOS
393-
runs-on: macos-13
393+
runs-on: macos-15
394394
steps:
395395
- name: Checkout
396396
uses: actions/checkout@v6
397-
# Force Xcode 14.3 since Xcode 15 doesnt support older versions of
398-
# kotlin. For Xcode 15, kotlin should be bumpped to 1.9.10
399-
# https://stackoverflow.com/a/77150623
400-
# For now, run with macos-13 which has this 14.3 installed:
401-
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode
402-
- name: Set up Xcode version
403-
run: sudo xcode-select -s /Applications/Xcode_14.3.app/Contents/Developer
404397
- name: set up Java
405398
uses: actions/setup-java@v4
406399
with:

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,7 @@ kotlin/**/generated
156156
MODULE.bazel.lock
157157

158158
# Ignore the generated docs
159-
docs/site
159+
docs/site
160+
161+
# Ignore generated files
162+
*.fbs.h

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ All major or breaking changes will be documented in this file, as well as any
44
new features that should be highlighted. Minor fixes or improvements are not
55
necessarily listed.
66

7+
## [25.12.19] (December 19 2025)(https://github.com/google/flatbuffers/releases/tag/v25.12.19)
8+
9+
* [C++] Default emptry vector support (#8870)
10+
* [C++] Add --gen-absl-hash option (#8868)
11+
* [Kotlin] Upgrade to MacOS 15 (#8845)
12+
* [C++] Fix vector of table with naked ptrs (#8830)
13+
* [Python] Optimize Offset/Pad/Prep (#8808)
14+
* Implement `--file-names-only` (#8788)
15+
* [C++] Fix size verifer (#8740)
16+
717
## [25.9.23] (September 23 2025)(https://github.com/google/flatbuffers/releases/tag/v25.9.23)
818

919
* flatc: `--grpc-callback-api` flag generates C++ gRPC Callback API server `CallbackService` skeletons AND client native callback/async stubs (unary + all streaming reactor forms) (opt-in, non-breaking, issue #8596).

CMake/Version.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(VERSION_MAJOR 25)
2-
set(VERSION_MINOR 9)
3-
set(VERSION_PATCH 23)
2+
set(VERSION_MINOR 12)
3+
set(VERSION_PATCH 19)
44
set(VERSION_COMMIT 0)
55

66
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")

CMakeLists.txt

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ set(FlatHash_SRCS
218218
set(FlatBuffers_Tests_SRCS
219219
${FlatBuffers_Library_SRCS}
220220
src/idl_gen_fbs.cpp
221+
tests/default_vectors_strings_test.cpp
222+
tests/default_vectors_strings_test.h
221223
tests/evolution_test.cpp
222224
tests/flexbuffers_test.cpp
223225
tests/fuzz_test.cpp
@@ -496,28 +498,34 @@ if(FLATBUFFERS_BUILD_SHAREDLIB)
496498
endif()
497499
endif()
498500

499-
function(compile_schema SRC_FBS OPT OUT_GEN_FILE)
501+
function(compile_schema SRC_FBS OPT SUFFIX OUT_GEN_FILE)
500502
get_filename_component(SRC_FBS_DIR ${SRC_FBS} PATH)
501-
string(REGEX REPLACE "\\.fbs$" "_generated.h" GEN_HEADER ${SRC_FBS})
503+
string(REGEX REPLACE "\\.fbs$" "${SUFFIX}.h" GEN_HEADER ${SRC_FBS})
502504
add_custom_command(
503505
OUTPUT ${GEN_HEADER}
504506
COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}"
505507
${OPT}
508+
--filename-suffix ${SUFFIX}
506509
-o "${SRC_FBS_DIR}"
507510
"${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}"
508511
DEPENDS flatc ${SRC_FBS}
509512
COMMENT "flatc generation: `${SRC_FBS}` -> `${GEN_HEADER}`"
510-
)
513+
)
511514
set(${OUT_GEN_FILE} ${GEN_HEADER} PARENT_SCOPE)
512515
endfunction()
513516

514517
function(compile_schema_for_test SRC_FBS OPT)
515-
compile_schema("${SRC_FBS}" "${OPT}" GEN_FILE)
518+
compile_schema("${SRC_FBS}" "${OPT}" "_generated" GEN_FILE)
519+
target_sources(flattests PRIVATE ${GEN_FILE})
520+
endfunction()
521+
522+
function(compile_schema_for_test_fbsh SRC_FBS OPT)
523+
compile_schema("${SRC_FBS}" "${OPT}" ".fbs" GEN_FILE)
516524
target_sources(flattests PRIVATE ${GEN_FILE})
517525
endfunction()
518526

519527
function(compile_schema_for_samples SRC_FBS OPT)
520-
compile_schema("${SRC_FBS}" "${OPT}" GEN_FILE)
528+
compile_schema("${SRC_FBS}" "${OPT}" "_generated" GEN_FILE)
521529
target_sources(flatsample PRIVATE ${GEN_FILE})
522530
endfunction()
523531

@@ -542,6 +550,7 @@ if(FLATBUFFERS_BUILD_TESTS)
542550
SET(FLATC_OPT_SCOPED_ENUMS ${FLATC_OPT_COMP};--scoped-enums)
543551

544552
compile_schema_for_test(tests/alignment_test.fbs "${FLATC_OPT_COMP}")
553+
compile_schema_for_test_fbsh(tests/default_vectors_strings_test.fbs "${FLATC_OPT_COMP}")
545554
compile_schema_for_test(tests/arrays_test.fbs "${FLATC_OPT_SCOPED_ENUMS}")
546555
compile_schema_for_test(tests/native_inline_table_test.fbs "${FLATC_OPT_COMP}")
547556
compile_schema_for_test(tests/native_type_test.fbs "${FLATC_OPT_COMP}")
@@ -571,8 +580,6 @@ if(FLATBUFFERS_BUILD_TESTS)
571580

572581
# Since flatsample has no sources, we have to explicitly set the linker lang.
573582
set_target_properties(flatsample PROPERTIES LINKER_LANGUAGE CXX)
574-
575-
compile_schema_for_samples(samples/monster.fbs "${FLATC_OPT_COMP}")
576583

577584
target_link_libraries(flatsamplebinary PRIVATE $<BUILD_INTERFACE:ProjectConfig> flatsample)
578585
target_link_libraries(flatsampletext PRIVATE $<BUILD_INTERFACE:ProjectConfig> flatsample)

FlatBuffers.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'FlatBuffers'
3-
s.version = '25.9.23'
3+
s.version = '25.12.19'
44
s.summary = 'FlatBuffers: Memory Efficient Serialization Library'
55

66
s.description = "FlatBuffers is a cross platform serialization library architected for

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module(
22
name = "flatbuffers",
3-
version = "25.9.23",
3+
version = "25.12.19",
44
compatibility_level = 1,
55
repo_name = "com_github_google_flatbuffers",
66
)

android/app/proguard-rules.pro

Lines changed: 0 additions & 21 deletions
This file was deleted.

android/app/src/main/cpp/animals.cpp

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,27 @@
1515
*/
1616

1717
#include <jni.h>
18-
#include <string>
1918
#include <search.h>
19+
20+
#include <string>
21+
2022
#include "generated/animal_generated.h"
2123

2224
using namespace com::fbs::app;
2325
using namespace flatbuffers;
2426

25-
extern "C" JNIEXPORT jbyteArray JNICALL Java_com_flatbuffers_app_MainActivity_createAnimalFromJNI(
26-
JNIEnv* env,
27-
jobject /* this */) {
28-
// create a new animal flatbuffers
29-
auto fb = FlatBufferBuilder(1024);
30-
auto tiger = CreateAnimalDirect(fb, "Tiger", "Roar", 300);
31-
fb.Finish(tiger);
27+
extern "C" JNIEXPORT jbyteArray JNICALL
28+
Java_com_flatbuffers_app_MainActivity_createAnimalFromJNI(JNIEnv* env,
29+
jobject /* this */) {
30+
// create a new animal flatbuffers
31+
auto fb = FlatBufferBuilder(1024);
32+
auto tiger = CreateAnimalDirect(fb, "Tiger", "Roar", 300);
33+
fb.Finish(tiger);
3234

33-
// copies it to a Java byte array.
34-
auto buf = reinterpret_cast<jbyte*>(fb.GetBufferPointer());
35-
int size = fb.GetSize();
36-
auto ret = env->NewByteArray(size);
37-
env->SetByteArrayRegion (ret, 0, fb.GetSize(), buf);
35+
// copies it to a Java byte array.
36+
auto buf = reinterpret_cast<jbyte*>(fb.GetBufferPointer());
37+
int size = fb.GetSize();
38+
auto ret = env->NewByteArray(size);
39+
env->SetByteArrayRegion(ret, 0, fb.GetSize(), buf);
3840
return ret;
3941
}

0 commit comments

Comments
 (0)