Skip to content

ci: sync the family files to v0.0.52 - #274

Closed
siracozmen01 wants to merge 1 commit into
mainfrom
ci/family-v0.0.52
Closed

siracozmen01 wants to merge 1 commit into
mainfrom
ci/family-v0.0.52

Conversation

@siracozmen01

Copy link
Copy Markdown
Contributor

Problem

.github v0.0.52 (c7b0f19) makes the family's header tests check, in C23, that the library's <PP>_NODISCARD is not empty, since GCC 14 reports its C23 as __STDC_VERSION__ 202000L and a macro that waits for 202311L leaves a dropped status unwarned there (#270). This repository still has the v0.0.51 copies of cmake/Testing.cmake and docs/internals/maul-conventions.md, so the family check fails and the header tests do not guard MUNI_NODISCARD in C.

Change

family_sync.py --write from .github at v0.0.52 rewrites the two files and nothing else:

  • cmake/Testing.cmake: maul_add_header_tests writes c23_nodiscard.c, which asserts that MUNI_NODISCARD expands to something, into the C23 header test.
  • docs/internals/maul-conventions.md: the nodiscard macro takes the attribute in any C dialect after C17 whose compiler has it, and the header tests check it in C23 and C++17.

No file mode changes. base.h already takes the attribute under GCC 14 (#271).

Verification

  • family_sync.py --check from v0.0.52: 0 differences.
  • Under linux-gcc-14 the header tests (header_test_c17, header_test_c23, header_test_cxx17) build with main's base.h. With base.h from before fix: make MUNI_NODISCARD the attribute under GCC 14's C23 too #271, header_test_c23 fails with "static assertion failed: MUNI_NODISCARD is empty in C23".
  • tools/check.sh changed passes: rules, and all 13 suites under linux-clang-20-asan.

Closes #273

@siracozmen01 siracozmen01 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review at d81f12e: ready. Read, not run.

Both files carry .github #122's blob indices: cmake/Testing.cmake 144bbe4 to 68163e3, docs/internals/maul-conventions.md 80f34b2 to 1e22be7. That is v0.0.52's content byte for byte, which I reviewed at 528d93b. include/maul-unicode/base.h at this head has the column-0 #define MUNI_NODISCARD [[nodiscard]] (lines 72 and 76), so the C23 check is generated. The title and body are fine as a squash message.

@siracozmen01

Copy link
Copy Markdown
Contributor Author

Replaced by #276, which syncs .github v0.0.54 and so carries this pull request's v0.0.52 changes to cmake/Testing.cmake and docs/internals/maul-conventions.md.

siracozmen01 added a commit that referenced this pull request Nov 5, 2026
## Problem

`MUNI_NODISCARD` marked every public function that returns a status, but no internal function returning `bool`. Many of those refuse something or give an answer the caller must act on:

- the iterator checks (`Load`, `RulesValid`, `muniCursorValid`);
- `muniWriterFits` and `muniNormalizerAdd`;
- lookups and steps whose `false` leaves an out value unset.

A call that dropped one of these results went on past a refusal, and no compiler warned. Nothing kept a new `bool` function from being added unmarked either. The organization's `.github` v0.0.53 makes the family rule uniform and adds a check for it; this repository also still had the v0.0.51 copies of `cmake/Testing.cmake` and `docs/internals/maul-conventions.md` (#273).

## Change

- `family_sync.py --write` from `.github` v0.0.54 (b52e9f7), the latest, which for this repository equals v0.0.53. It writes `tools/check_nodiscard.py` and the v0.0.52 and v0.0.53 changes to `cmake/Testing.cmake` (the C23 check that `MUNI_NODISCARD` is not empty) and `docs/internals/maul-conventions.md`. This takes in #274, which this pull request replaces.
- Every function returning `bool` that is declared in a header under `src/`, and every `static` one in a source file under `src/`, carries `MUNI_NODISCARD`: 57 declarations in 26 files, plain answers and lookups as well as refusals. None is in `src/generated/`.
- `src/overlap.h` and `src/writer.h` reached no public header, so they now include `maul-unicode/base.h` for the macro. `tools/modules.txt` allows any public header.
- `tools/check.sh` runs `python3 tools/check_nodiscard.py --self-test` and `python3 tools/check_nodiscard.py` in its rules step, and CI's family checks step runs both too, since that step lists each check itself.

## The deliberate drops

None. With every `bool` marked, the linux-gcc-14 and linux-clang-20-asan builds (library, tools, samples, benchmarks and tests, with `-Werror`) report no dropped result, and the tree held no `(void)` cast on a call to any of these functions. The HarfBuzz adapter calls only the public API.

## Verification

- `python3 tools/check_nodiscard.py` passes, and its `--self-test` passes. In a copy of the tree, with the mark removed from `muniWriterFits` it names `src/writer.h:72` and exits 1, and an indented `bool` declaration added to `src/overlap.h` is reported as one it does not read.
- linux-gcc-14 builds clean and passes 13/13; linux-clang-20-asan builds clean and passes 13/13.
- `family_sync.py --check` from v0.0.54: 0 differences.
- `tools/check.sh changed` passes: the rules with the new check, format, clang-tidy in Release and Debug, and all 13 suites under linux-clang-20-asan.

Closes #275
Closes #273
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sync the family files to .github v0.0.52

1 participant