Take libakgl 0.9.0, and shadow set_property(TEST) so it configures
0.9.0 is the akgl_ui subsystem: a vendored clay, an arena, menus, HUDs and dialogs, reached through a new akgl/ui.h this project does not include. Every header the akbasic_akgl target actually compiles against is byte-identical to 0.8.0, so unlike the 0.8.0 bump there is no sizeof to get wrong. The floor in include/akbasic/akgl.h moves to 0.9.0 anyway, on the standing rule that the soname carries MAJOR.MINOR while the major is 0. It does not configure as it stands. 0.9.0 moved eight test property calls off set_tests_properties -- correctly, because that command splits a semicolon-separated value and had been silently reducing its LD_LIBRARY_PATH prepend list to one directory -- onto set_property(TEST ...). This repository suppresses add_test() while it pulls its dependencies in, so those test names do not exist, and set_property errors on an unknown test name where set_tests_properties was silent: eight hard configure failures. Shadow set_property in its TEST form only; every other form has to pass through, since the dependencies set target and directory properties their own builds need. libakgl's status band grew to seven codes with AKGL_ERR_UI and it now owns 256 to 262, so the coordinated range map, docs/15-error-codes.md and both header comments follow. TODO.md section 5's persistent-drawing-layer item still stands: 0.9.0's arena draws inside the frame like everything else, and there is still no render-to-texture layer. Both configurations build and both suites pass -- 110/110 without libakgl, 111/111 with it, akgl_typing included. Co-Authored-By: Tachikoma (Claude Code Opus 5 1M) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EwxGB6TdoVvZ11KQQME9cL
This commit is contained in:
@@ -166,7 +166,7 @@ a mixed build leaks pool slots or frees one twice rather than failing to link.
|
||||
|---|---|---|---|---|
|
||||
| `deps/libakerror` | 2.0.1 | `libakerror.so.2` | major only | **none** — no version macro; `include/akbasic/error.h` feature-tests `AKERR_THREAD_SAFE` and `AKERR_EXIT_STATUS_UNREPRESENTABLE` instead |
|
||||
| `deps/libakstdlib` | 0.2.0 | `libakstdlib.so.0.2` | **`MAJOR.MINOR` while major is 0** | `AKSL_VERSION_*`, `aksl_version()`, `AKSL_VERSION_CHECK()` |
|
||||
| `deps/libakgl` | 0.8.0 | `libakgl.so.0.8` | **`MAJOR.MINOR` while major is 0** | `AKGL_VERSION*`, `akgl_version()`, `AKGL_VERSION_AT_LEAST()` |
|
||||
| `deps/libakgl` | 0.9.0 | `libakgl.so.0.9` | **`MAJOR.MINOR` while major is 0** | `AKGL_VERSION*`, `akgl_version()`, `AKGL_VERSION_AT_LEAST()` |
|
||||
|
||||
For both 0.x libraries the soname carries `MAJOR.MINOR` deliberately: 0.1 and 0.2 are
|
||||
*different* ABIs, and both become major-only at 1.0. Do not read `0.1 → 0.2` as a compatible
|
||||
@@ -217,6 +217,17 @@ scopes. We shadow `add_test()` and `set_tests_properties()` for the duration of
|
||||
`add_subdirectory()` calls. `libakstdlib` carries the same shadow but only arms it when *it*
|
||||
is top-level, so it does nothing for us — ours has to wrap all three.
|
||||
|
||||
`set_property(TEST ...)` has to be shadowed alongside them, and **only in its `TEST` form**.
|
||||
`libakgl` 0.9.0 moved eight of these calls off `set_tests_properties`, correctly: that command
|
||||
parses its arguments as name/value pairs, so a semicolon-separated value is split and every
|
||||
element after the first is consumed as a bogus property name — which silently reduced its
|
||||
`LD_LIBRARY_PATH` prepend list to one directory. `set_property` does not split. But with
|
||||
`add_test()` suppressed the tests those calls name do not exist, and `set_property` **errors**
|
||||
on an unknown test name where `set_tests_properties` was silent, so pulling 0.9.0 in turned
|
||||
eight quiet no-ops into eight hard configure failures. Every other form — `GLOBAL`,
|
||||
`DIRECTORY`, `TARGET`, `SOURCE`, `INSTALL`, `CACHE` — must pass straight through; the
|
||||
dependencies set target and directory properties their own builds depend on.
|
||||
|
||||
**Only one project in a tree may shadow `add_test()`, and this is that project.** CMake
|
||||
exposes an overridden command as `_name` and chains exactly one level: a second override
|
||||
rebinds `_add_test` to the first override and the builtin becomes unreachable to everyone, so
|
||||
@@ -503,8 +514,8 @@ not need a second reservation:
|
||||
|---|---|---|
|
||||
| `"libakerror"` | 0 – 255 | reserved by `akerr_init()`; do not touch |
|
||||
| *(none)* | — | `libakstdlib` deliberately reserves nothing and defines no codes of its own — it raises `AKERR_*` and propagates `errno`, both inside the reserved band. Its `tests/test_status_registry.c` pins that as a contract, so nobody has to coordinate with it |
|
||||
| `"libakgl"` | 256 – 261 | reserved by `akgl_error_init()`; `AKGL_ERR_BASE` … `AKGL_ERR_LIMIT - 1`, six codes. Was five until 0.8.0 added `AKGL_ERR_COLLISION` |
|
||||
| *(free)* | 262 – 511 | headroom for `libakgl` to grow into; do not claim it |
|
||||
| `"libakgl"` | 256 – 262 | reserved by `akgl_error_init()`; `AKGL_ERR_BASE` … `AKGL_ERR_LIMIT - 1`, seven codes. Was five until 0.8.0 added `AKGL_ERR_COLLISION` and 0.9.0 added `AKGL_ERR_UI` |
|
||||
| *(free)* | 263 – 511 | headroom for `libakgl` to grow into; do not claim it |
|
||||
| `"akbasic"` | 512 – 767 | ours; `AKBASIC_ERR_BASE` is 512 |
|
||||
|
||||
Values 0–255 are the host errno space plus the `AKERR_*` codes. Consumers allocate from
|
||||
|
||||
Reference in New Issue
Block a user