Repository navigation
feat: define the version macros in seqlock.h - #9
Merged
Merged
Conversation
seqlock_version.h was generated at configure time, so a copied-in header had no version. seqlock.h now defines the macros, including a long SEQLOCK_VERSION_NUMBER that cannot overflow a 16-bit int, and meson setup fails when they differ from project(version:). seqlock_version.h stays installed as a deprecated header that includes seqlock.h. The version block carries an inline Rule 2.5 deviation, because the library defines the macros for consumers and never uses them. Refs #8
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
seqlock.hdefinesSEQLOCK_VERSION_MAJOR,_MINOR,_PATCH,SEQLOCK_VERSION,SEQLOCK_VERSION_STRINGand a newSEQLOCK_VERSION_NUMBER(long,MAJOR * 10000 + MINOR * 100 + PATCH), so a copy-in build carries its version.meson.buildreads the header withfs.readand fails to configure when any macro differs fromproject(version:);meson_versionis now>=0.57.0. The generated template is removed.seqlock_version.his a deprecated header that includesseqlock.h, installed beside it until the next major release.tests/test_seqlock.cincludesseqlock_version.hand checksSEQLOCK_VERSION_NUMBERagainst its parts.docs/design.md; the three baselines are unchanged.docs/api.mdgains a Version section with a compiled#ifexample; integration, AGENTS and CHANGELOG are updated.Checks run
meson testunder ASan and UBSan: 11/11, includingversion_macros.SEQLOCK_VERSION_PATCHset to 2 fails configure withinclude/seqlock.h must define SEQLOCK_VERSION_PATCH as 1.misch run --baselinefor the default,c11andno_atomicsprofiles, andmisch deviations: clean.scripts/format.sh: clean.seqlock_version.hand checking every macro compiles with gcc-Werrorand with cl2000 22.6.2 and 25.11.1--c11under COFF and EABI with--emit_warnings_as_errors.Refs #8