100 Commits
Author SHA1 Message Date
Derek Bailey 7af1efe4b2 Regenerate monster_test_bfbs_generated.h with alignas(uint64_t) (#9434)
Commit 6dda43bb (#9425) added `alignas(uint64_t)` to embedded binary schemas
generated by `flatc --bfbs-gen-embed`. Regenerate `tests/monster_test_bfbs_generated.h`
via `scripts/generate_code.py` to keep checked-in test artifacts in sync and
unblock CI Check Generated Code.

GitOrigin-RevId: 3786479bebd33365edc91aa13388cdf95d7313d9
2026-10-26 09:06:45 -07:00
Derek Bailey 6dda43bbaa Ensure embedded FlatBuffers binary schemas are 8-byte aligned (#9425)
In `src/idl_gen_cpp.cpp`, code generated by `flatc --bfbs-gen-embed` emits `static const uint8_t bfbsData[...] = { ... };`. Because `uint8_t` has 1-byte alignment, the array may be placed at an unaligned address in `.rodata`, triggering alignment traps under Clang UBSan on Arm when accessed via FlatBuffers root accessors.

Add `alignas(uint64_t)` to the generated `bfbsData` array declaration in `GenerateBinarySchema` so embedded binary schemas are 8-byte aligned across all architectures.

PiperOrigin-RevId: 1003962636
2026-10-21 13:37:51 -07:00
Derek Bailey 9a8a511b52 Enable locale-independent strtod_l/strtof_l on Linux glibc (#9424)
Restrict the `__linux__` check for `FLATBUFFERS_LOCALE_INDEPENDENT` in `include/flatbuffers/base.h` to `(!defined(__linux__) || defined(__GLIBC__))` so Linux with glibc enables `strtod_l`/`strtof_l`.

PiperOrigin-RevId: 1002266254
2026-10-21 13:25:17 -07:00
Derek Bailey 2e07f269b9 Update build.yml
Remove 64-core windows github action runner as it is a charged product we need to do expense
2026-03-17 09:58:26 -07:00
Derek Bailey 0d67abde45 MODULE.bazel: Upgrade rules_swift version (#8908) 2026-01-20 16:56:11 -08:00
Derek Bailey 522f2379a6 Update CODEOWNERS 2025-12-21 16:10:34 -08:00
Derek Bailey 7e163021e5 FlatBuffers Version 25.12.19 (#8871) 2025-12-19 15:06:07 -08:00
Derek Bailey 57fdd4f995 Default Vector Support C++ (#8870) 2025-12-19 14:32:51 -08:00
Derek Bailey 8cb53ccc95 Add --gen-absl-hash option to generate AbslHashValue for structs. (#8868) 2025-12-19 11:49:50 -08:00
Derek Bailey fb55e0c9de Run clang-format -i **/*.cpp (#8865) 2025-12-19 10:42:57 -08:00
Derek Bailey d9fde67eb5 Remove progaurd-rules.pro (#8866) 2025-12-19 09:54:43 -08:00
Derek Bailey f74fda299d Update CODEOWNERS
Ensure no-one can add to owners other than myself as the official Google representative of this repo.
2025-12-18 17:14:33 -08:00
Derek Bailey 15802fa26c Create CODEOWNERS
Add a CODEOWNERS files to assign ownership to different parts of the code base
2025-12-18 17:03:50 -08:00
Derek Bailey 1872409707 FlatBuffers Version 25.9.23 (#8708) 2025-09-23 22:18:02 -07:00
Derek Bailey caf3b494db bulk code format fix (#8707) 2025-09-23 21:50:27 -07:00
Derek Bailey 0e047869da Use the Google Style for clang-format without exceptions (#8706)
This reduces the friction when merging from github and google repos by
using the exact same clang style guide.

MARKDOWN=true
2025-09-23 21:19:33 -07:00
Derek Bailey ef1030ff0b Update build.yml - disable gradle CI failures
Both of this are failing and blocking other non-related PRs, disabling for now.
2025-08-27 23:22:12 -07:00
Derek Bailey 53c8c2ef16 Update build.yml - disable Test Swift Windows
This continually fails and the error message is cryptic enough that I don't know how to fix it without an expert.
2025-08-27 23:11:24 -07:00
Derek Bailey f83525fe67 Update build.yml - update gradle actions
This follows the recommendation here: https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#general-usage
2025-08-27 22:55:17 -07:00
Derek Bailey b2cce474ba Update build.yml - use java-version 21
Our CI is broken and this is the error:

```
FAILURE: Build failed with an exception.

* What went wrong:
Gradle requires JVM 17 or later to run. Your build is currently configured to use JVM 11.
```

So updating our java-versions to the latest stable version which is 21 apparently.
2025-08-27 22:41:07 -07:00
Derek Bailey 1c514626e8 FlatBuffers Version 25.2.10 2025-02-10 20:25:03 -08:00
Derek Bailey 0312061985 FlatBuffers Version 25.1.24 2025-01-24 16:36:11 -08:00
Derek Bailey 69ac6a712d Add bazel ci (#8497) 2025-01-22 13:41:45 -08:00
Derek Bailey df287ee6a7 FlatBuffers Version 25.1.21 2025-01-21 17:22:30 -08:00
Derek Bailey 5414e04b45 Add imports for bazel (#8486) 2025-01-15 09:24:34 -08:00
Derek Bailey c9a286bf29 Update mkdocs.yml redirect
Fixes #8485
2025-01-15 08:21:09 -08:00
Derek Bailey 8e2852fa73 Update issue templates 2025-01-13 21:28:41 -08:00
Derek Bailey 8694806f14 schema.md Fixed some warnings (#8472) 2024-12-27 12:29:22 -08:00
Derek Bailey 5a75ad407d mkdocs.yml add footer and other info (#8471) 2024-12-27 11:47:49 -08:00
Derek Bailey 2d86857bec Add Annotating Docs (#8470)
* `quick_start.md`: Add quick start guide

* `annotation.md`: Add section on annotating flatbuffers
2024-12-27 11:25:21 -08:00
Derek Bailey 0f90dc8290 quick_start.md: Add quick start guide (#8469) 2024-12-27 08:52:22 -08:00
Derek Bailey c9125e6385 flatc.md Add more documentation (#8467)
* CNAME: add custom domain

* `flatc.md`: Add more documentation
2024-12-24 12:15:14 -08:00
Derek Bailey 7e59e0727c CNAME: add custom domain (#8465) 2024-12-23 22:22:24 -08:00
Derek Bailey 79d9e33ea3 Update docs.yml
replace `main` with `master` that we are still using
2024-12-23 22:07:28 -08:00
Derek Bailey bbb6b932fc contributions.md Add doc about how to contribute to flatbuffers (#8464) 2024-12-23 22:06:04 -08:00
Derek Bailey 46cc3d6432 docs.yml enable for pushes to main branch (#8463) 2024-12-23 20:49:27 -08:00
Derek Bailey fb3ccd36c0 docs.yml Add workflow for updating docs (#8462) 2024-12-23 16:04:15 -08:00
Derek Bailey 492475a1b2 Add new Docs source files (#8461) 2024-12-23 15:55:56 -08:00
Derek Bailey c75a0154eb Move docs/ to docs-old/ 2024-12-23 15:32:19 -08:00
Derek Bailey a2cd1ea3b6 FlatBuffers Version 24.12.23 (#8459)
* FlatBuffers Release 24.12.23

* Fixed missing generated file version checks

* Run generate_code and fix cpp17 tests
2024-12-23 12:55:07 -08:00
Derek Bailey 32e63af684 Kotlin MacOs switch to macos-13
Switch off of macos-latest which no longer has the 14.3 xcode installed. Version macos-13 does.

We should probably update our kotlin though.
2024-12-23 09:10:46 -08:00
Derek Bailey a5a2da0161 Update release.sh (#8322)
* Update release.sh

Update release script to update rust flexbuffers

* Update Cargo.toml
2024-05-28 18:44:37 -07:00
Derek Bailey 28783927af Update release.yml
Fix pathing in Crates.io publishing.
2024-05-28 18:36:11 -07:00
Derek Bailey a1378fbd16 Update release.yml
Remove extra -
2024-05-28 18:34:26 -07:00
Derek Bailey dcacfc5b11 Update release.yml
Use explicit paths in publish-crates. Also adds flexbuffers publishing.
2024-05-28 18:33:04 -07:00
Derek Bailey f9dabf511a Update release.yml
Update working directory of crates.io publishing
2024-05-28 18:28:18 -07:00
Derek Bailey 299725fe2e Update build.yml (#8321)
Add a scheduled cron job to run all the main tests at 4:45 A.M. to catch dependency regressions.
2024-05-28 18:01:00 -07:00
Derek Bailey d89f611f6f Update build.yml to ubuntu-24.04 (#8319)
* Update build.yml to ubuntu-24.04

Apparently g++-13 was removed from the ubuntu-22.04 runners.

We also don't have enterprise runners at 24.04 yet, so just use the free ones for now until we get support for those. CI builds might take longer now.

* Update build.yml

Downgrade to g++12 and revert change to using normal runners

* Update build.yml

Go back to ubuntu-24.04 and update both gcc and clang to their latest versions according to [this](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md?plain=1#L16-L20).

* Update build.yml

Go back to g++13 for now, as we get some exotic warning in g++14 for newer C++ standards.

* Update build.yml

Fix the other issues with `macos-latest` going to arm: https://github.com/actions/runner-images/tree/main?tab=readme-ov-file#available-images and that Swift wasn't installed in the ubuntu-24.04 by default.

* Update build.yml

Disable Kotlin MacOs CI
2024-05-28 17:18:00 -07:00
Derek Bailey e646392647 flatbuffer_builder: Fix GetTemporaryPointer constantness 2024-04-17 16:06:26 +00:00
Derek Bailey 8f2e1dbd88 Start Release workflow when published 2024-03-26 05:31:50 +00:00
Derek Bailey 595bf0007a FlatBuffers Version v24.3.25 2024-03-26 05:18:07 +00:00
Derek Bailey 67eb95de92 presubmit.yml: Use xcode 14.2
It appears the upgrade to xcode 14.3 broke the macos build on builkite.
The last good build was using xcode 14.2, so go back to this version
until the issue is resolved.
2024-03-12 00:16:04 +00:00
Derek Bailey 6ff9e90e7e FlatBuffers Version v24.3.7 2024-03-07 15:16:33 -08:00
Derek Bailey 5b32e8f5c2 : Don't depend on java version 2024-03-07 14:56:09 -08:00
Derek Bailey 0bed8cd4a0 FlatBuffers Version v24.3.6 2024-03-07 07:23:33 +00:00
Derek Bailey 7cd216c51e FlatBuffers Version v24.3.6 2024-03-07 06:52:51 +00:00
Derek Bailey e5fc3b16d8 flatbuffer_builder: Prevent Finish() from being called twice 2023-12-19 18:41:26 +00:00
Derek Bailey 70c8292c29 Update README.md
Remove Google Groups and Gitter links
2023-12-18 19:39:10 -08:00
Derek Bailey 66bd3d7400 WORKSPACE: Run Buildifier 2023-12-18 05:47:56 +00:00
Derek Bailey 0cc1edb3ad WORKSPACE: go back to version that was working 2023-12-18 05:42:30 +00:00
Derek Bailey 57375a9e1c WORKSPACE: fix swift 2023-12-18 05:37:38 +00:00
Derek Bailey 0346535221 presubmit.yml: Explicitly use bazel 6.4.0 2023-12-18 05:33:39 +00:00
Derek Bailey 7d62dcc422 WORKSPACE: include latst build_bazel_rules_swift 2023-12-17 07:19:20 +00:00
Derek Bailey b3cd878dfe WORKSPACE: remove old swift download 2023-12-17 07:12:14 +00:00
Derek Bailey 09486a9f97 WORKSPACE: update apple and rule_js 2023-12-17 07:07:30 +00:00
Derek Bailey 0e1305c8e2 Update label.yml
copy paste issue with last commit
2023-12-16 22:22:07 -08:00
Derek Bailey 88549130e1 Update label.yml
Go to version 4.1.0 as version main has breaking changes.
2023-12-16 22:17:46 -08:00
Derek Bailey d3055a97e7 update goldens with namespace 2023-11-19 07:51:36 +00:00
Derek Bailey a632c3c004 Update build.yml (#8163)
* Update build.yml

Use our enterprise runners

* Make a default runs-on

* Update build.yml

Use the latest 64-core runners

* Update build.yml

Fix windows runner that don't have visual studios

* Update build.yml

use windows-2019 as the 2022 doesn't seem to have visual studios installed
2023-11-18 15:04:24 -08:00
Derek Bailey eb80ead90b Update build.yml (#8162)
Removes some old comments from the CI builds.
2023-11-18 13:09:02 -08:00
Derek Bailey 4354945727 Fix CI builds (#8161)
* Update build.yml

Upgrade to gcc 13 and clang 15

* switch to __is_trivially_copyable

* fix cmake issue and warning about sign comparison

* Use libc++ for C++23 on clang for now

* Use libc++ for C++23 on clang for now

* exclude clang+15 for C++13 builds
2023-11-18 00:19:03 -08:00
Derek Bailey 053d39adaf Update build.yml
Update to clang-14 as clang-12 is no longer supported
2023-09-28 22:26:28 -07:00
Derek Bailey 8836ddab41 Update stale.yml 2023-07-08 15:18:47 -07:00
Derek Bailey 0cc525b722 fix android typo 2023-05-31 19:31:47 +00:00
Derek Bailey 28861d1d7d various fixes (#7986) 2023-05-31 11:52:05 -07:00
Derek Bailey 96294e9f84 Add ForceVectorAlignment64 and test (#7977) 2023-05-26 11:49:06 -07:00
Derek Bailey 0100f6a577 FlatBuffers Version 23.5.26 (#7976) 2023-05-26 10:33:09 -07:00
Derek Bailey b67f1ad6d0 don't emit flatbuffers include in bfbs generated output (#7968) 2023-05-17 21:13:16 -07:00
Derek Bailey ae6753684e switch back to having T explicitly defined in CreateVector (#7967) 2023-05-17 13:23:34 -07:00
Derek Bailey d64dc6200a Switch to using alias instead of a typedef for FlatBufferBuilder (#7966) 2023-05-17 10:40:02 -07:00
Derek Bailey fe5e4c71c5 remove flatbuffers tests from android (#7959) 2023-05-12 21:49:33 -07:00
Derek Bailey cbc8872b99 fix Mac build about gen sources and multiple targets 2023-05-12 17:11:18 -07:00
Derek Bailey 05743591e1 remove and auto-generate arrays_test_generated.h 2023-05-12 16:44:28 -07:00
Derek Bailey 2bc2529245 remove and auto-generate alignment_test_generated.h 2023-05-12 16:26:21 -07:00
Derek Bailey 86486a1735 run scripts/clang-format-all.sh 2023-05-11 12:23:49 -07:00
Derek Bailey c2f764c22b add GetSizePrefixedBufferLength() 2023-05-11 12:22:05 -07:00
Derek Bailey e97ff95970 Change SizedPrefixed verifier to be <= provided size 2023-05-11 12:22:05 -07:00
Derek Bailey 33212657ae Change SizedPrefixed verifier to be <= provided size (#7957)
* Change SizedPrefixed verifier to be <= provided size

* add GetSizePrefixedBufferLength()
2023-05-11 12:21:50 -07:00
Derek Bailey 66e9d9823a fixed other occurenace of big buffer 2023-05-11 09:39:54 -07:00
Derek Bailey 9fc153a8f8 remove large buffer creation in test to speed it up 2023-05-11 09:34:50 -07:00
Derek Bailey 0ce6957763 remove unneeed grpc include 2023-05-10 16:41:39 -07:00
Derek Bailey 82c6712606 make loop variable final in dart 2023-05-10 16:30:12 -07:00
Derek Bailey b5957975c5 rename __suppress_ubsan to FLATBUFFERS_SUPPRESS_UBSAN 2023-05-10 14:16:31 -07:00
Derek Bailey 85f71321fd Update README.md
Added Quick State to the main readme file
2023-05-10 13:56:13 -07:00
Derek Bailey 3e6cd51b63 fixed bfbs gen to pass extra options (#7949) 2023-05-09 22:42:31 -07:00
Derek Bailey 10b79d87c1 removed extern code generation declarations preferring direct includes (#7948)
* removed extern code generation definitions, preferring direct includes

* add static to functions

* remove idl_gen_lua
2023-05-09 21:50:28 -07:00
Derek Bailey 16a7df46f0 fix --conform raising No generators registered error 2023-05-09 20:37:32 -07:00
Derek Bailey 76f5e9816a fix out-of-source builds with cmake (#7946) 2023-05-09 20:33:54 -07:00
Derek Bailey 72b56fd081 FlatBuffers Version 23.5.9 (#7945) 2023-05-09 09:33:30 -07:00
Derek Bailey 63b7b25289 FlatBuffers 64 for C++ (#7935)
* First working hack of adding 64-bit. Don't judge :)

* Made vector_downward work on 64 bit types

* vector_downward uses size_t, added offset64 to reflection

* cleaned up adding offset64 in parser

* Add C++ testing skeleton for 64-bit

* working test for CreateVector64

* working >2 GiB buffers

* support for large strings

* simplified CreateString<> to just provide the offset type

* generalize CreateVector template

* update test_64.afb due to upstream format change

* Added Vector64 type, which is just an alias for vector ATM

* Switch to Offset64 for Vector64

* Update for reflection bfbs output change

* Starting to add support for vector64 type in C++

* made a generic CreateVector that can handle different offsets and vector types

* Support for 32-vector with 64-addressing

* Vector64 basic builder + tests working

* basic support for json vector64 support

* renamed fields in test_64bit.fbs to better reflect their use

* working C++ vector64 builder

* Apply --annotate-sparse-vector to 64-bit tests

* Enable Vector64 for --annotate-sparse-vectors

* Merged from upstream

* Add `near_string` field for testing 32-bit offsets alongside

* keep track of where the 32-bit and 64-bit regions are for flatbufferbuilder

* move template<> outside class body for GCC

* update run.sh to build and run tests

* basic assertion for adding 64-bit offset at the wrong time

* started to separate `FlatBufferBuilder` into two classes, 1 64-bit aware, the other not

* add test for nested flatbuffer vector64, fix bug in alignment of big vectors

* fixed CreateDirect method by iterating by Offset64 first

* internal refactoring of flatbufferbuilder

* block not supported languages in the parser from using 64-bit

* evolution tests for adding a vector64 field

* conformity tests for adding/removing offset64 attributes

* ensure test is for a big buffer

* add parser error tests for `offset64` and `vector64` attributes

* add missing static that GCC only complains about

* remove stdint-uintn.h header that gets automatically added

* move 64-bit CalculateOffset internal

* fixed return size of EndVector

* various fixes on windows

* add SizeT to vector_downward

* minimze range of size changes in vector and builder

* reworked how tracking if 64-offsets are added

* Add ReturnT to EndVector

* small cleanups

* remove need for second Array definition

* combine IndirectHelpers into one definition

* started support for vector of struct

* Support for 32/64-vectors of structs + Offset64

* small cleanups

* add verification for vector64

* add sized prefix for 64-bit buffers

* add fuzzer for 64-bit

* add example of adding many vectors using a wrapper table

* run the new -bfbs-gen-embed logic on the 64-bit tests

* remove run.sh and fix cmakelist issue

* fixed bazel rules

* fixed some PR comments

* add 64-bit tests to cmakelist
2023-05-09 09:16:30 -07:00