From 445fd384952bd201ac5e5a2ad3c87206ab1f69af Mon Sep 17 00:00:00 2001 From: Aaron James Long Date: Thu, 15 Oct 2026 14:48:31 +0100 Subject: [PATCH] refactor!: remove the deprecated seqlock_version.h seqlock.h defines the version macros, so seqlock_version.h only forwarded to it. Code that included it includes seqlock.h instead. Removing an installed header breaks code that still includes it, so the next release bumps the minor version. Refs #10 --- AGENTS.md | 2 +- CHANGELOG.md | 6 +++++- docs/api.md | 2 +- docs/integration.md | 2 -- include/seqlock_version.h | 19 ------------------- meson.build | 1 - tests/test_seqlock.c | 3 +-- 7 files changed, 8 insertions(+), 27 deletions(-) delete mode 100644 include/seqlock_version.h diff --git a/AGENTS.md b/AGENTS.md index 583fb59..c932255 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -49,7 +49,7 @@ scripts/format.sh --fix # rewrite in place ### 1.2 Notes -- `include/seqlock.h` defines the version macros, and `meson setup` fails when they differ from `project(version:)`, so a release updates both. `include/seqlock_version.h` is a deprecated header that includes `seqlock.h`. +- `include/seqlock.h` defines the version macros, and `meson setup` fails when they differ from `project(version:)`, so a release updates both. - The build produces only a static library. The only Meson option is `build_tests`. - `SEQLOCK_COUNTER_TYPE` and the backend macros must be identical for the library and every caller; nothing detects a mismatch. `seqlock.h` includes `seqlock_conf.h` with quotes, so configuration is by `-D` only, never by a replacement header. - ThreadSanitizer needs a 4 KiB-page kernel with a 48-bit address space on AArch64, and AddressSanitizer does not start on a 39-bit one; use a plain native build there. diff --git a/CHANGELOG.md b/CHANGELOG.md index dc900cd..67a1188 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,13 +16,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Changed -- `seqlock.h` defines `SEQLOCK_VERSION_MAJOR`, `_MINOR`, `_PATCH`, `SEQLOCK_VERSION`, `SEQLOCK_VERSION_STRING` and a new `SEQLOCK_VERSION_NUMBER` (`long`, `MAJOR * 10000 + MINOR * 100 + PATCH`), so a copied-in header carries its version. `seqlock_version.h` is no longer generated; it is installed as a deprecated header that includes `seqlock.h`. Meson fails to configure when the header and `project(version:)` disagree, and the build needs Meson 0.57 or later. +- `seqlock.h` defines `SEQLOCK_VERSION_MAJOR`, `_MINOR`, `_PATCH`, `SEQLOCK_VERSION`, `SEQLOCK_VERSION_STRING` and a new `SEQLOCK_VERSION_NUMBER` (`long`, `MAJOR * 10000 + MINOR * 100 + PATCH`), so a copied-in header carries its version. Meson fails to configure when the header and `project(version:)` disagree, and the build needs Meson 0.57 or later. - The build produces and installs only the static library. The shared library, which neither `seqlock_dep` nor `seqlock.pc` linked, is no longer built. - CI installs Meson, Ninja and gcovr with `uv` instead of `pip`. - CI gates on 100% branch coverage as well as line coverage. The reader retry branches are reached deterministically by a single-threaded test, and the no-atomics backend is built and tested alongside the C11 backend. - Added security policy, SPDX headers, and cleaned ignore rules while leaving the existing special coverage/concurrency handling unchanged. +### Removed + +- `seqlock_version.h`. `seqlock.h` defines the version macros. + ## [0.1.1] - 2026-06-03 ### Fixed diff --git a/docs/api.md b/docs/api.md index 7af7e0a..b2e1614 100644 --- a/docs/api.md +++ b/docs/api.md @@ -192,4 +192,4 @@ record_load(const record_cell_t *cell, void *out) #endif ``` -`SEQLOCK_VERSION_STRING` is the same string as `SEQLOCK_VERSION`. `seqlock_version.h` is a deprecated header that includes `seqlock.h`, kept so existing includes compile until the next major release. +`SEQLOCK_VERSION_STRING` is the same string as `SEQLOCK_VERSION`. diff --git a/docs/integration.md b/docs/integration.md index 82f1cf1..741854e 100644 --- a/docs/integration.md +++ b/docs/integration.md @@ -57,8 +57,6 @@ The install contains `libseqlock.a`, the headers in a `seqlock/` subdirectory, a #include ``` -`seqlock_version.h` is installed beside it as a deprecated header that includes `seqlock.h`. - ## Configuration Every option in `seqlock_conf.h` sits behind an `#ifndef` guard, so a `-D` definition replaces the shipped default. The options are described in [api.md](api.md#configuration). diff --git a/include/seqlock_version.h b/include/seqlock_version.h deleted file mode 100644 index 8574c4b..0000000 --- a/include/seqlock_version.h +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-License-Identifier: MIT - * - * @file seqlock_version.h - * - * @brief - * Deprecated: the version macros are defined in seqlock.h. - * - * @details - * This header includes seqlock.h so that existing includes keep compiling. - * It will be removed in the next major release. - */ - -#ifndef SEQLOCK_VERSION_H_ -#define SEQLOCK_VERSION_H_ - -#include "seqlock.h" - -#endif /* SEQLOCK_VERSION_H_ */ diff --git a/meson.build b/meson.build index 99fc6c5..d24af63 100644 --- a/meson.build +++ b/meson.build @@ -49,7 +49,6 @@ seqlock_lib = static_library( install_headers( 'include/seqlock.h', 'include/seqlock_conf.h', - 'include/seqlock_version.h', subdir: 'seqlock', ) diff --git a/tests/test_seqlock.c b/tests/test_seqlock.c index 6b0f18f..075fe8c 100644 --- a/tests/test_seqlock.c +++ b/tests/test_seqlock.c @@ -10,7 +10,6 @@ #include "seqlock.h" #include "seqlock_test.h" -#include "seqlock_version.h" #include #include @@ -152,7 +151,7 @@ TEST_CASE(test_large_payload) } } -/* The deprecated version header still exposes the macros from seqlock.h. */ +/* The version number agrees with its parts. */ TEST_CASE(test_version_macros) { TEST_ASSERT(SEQLOCK_VERSION_NUMBER