Skip to content

Commit 0d18e85

Browse files
authored
compat.yaml-cpp 0.8.0/0.9.0 on openkal; openkal-ecosystem/openkal-compat labels; openkal measurement selects by change on x86_64-windows-musl; maintainer-hosted CN mirrors; a shorter README (#464)
* compat.yaml-cpp 0.8.0 and 0.9.0, measured on openkal; the site's openkal facet names openkal-ecosystem and openkal-compat; a shorter README compat.yaml-cpp builds upstream's CMake target as it is (src/*.cpp plus the contrib GraphBuilder), from the GitHub tag archives mirrored byte for byte to gitcode mcpp-res/yaml-cpp. YAML_CPP_STATIC_DEFINE, a PUBLIC definition of a static build upstream, reaches consumers through a yaml-cpp/dll.h shim, since descriptor `defines` stay package-private; the test asserts it at compile time. Each version has a member (yaml-cpp, yaml-cpp-v080), and both are measured on openkal. The test found an upstream defect: GraphBuilderInterface's pure virtual destructor is defined nowhere, so a derived class links only when its user defines it. The test does, as any consumer must; the descriptor does not. The site's openkal facet had three sentences for values (openkal itself / runs on openkal / fails on openkal). It now has two names: openkal-ecosystem for the packages that make up openkal, openkal-compat for packages measured to run in an openkal graph. A package that only builds or fails is filed under neither; its page still shows the per-target measurement. The README keeps one line per shape in its reference table; the long explanations for recastnavigation and huxerui move into the descriptor catalog, which gains a yaml-cpp row. * openkal measurement selects by change and names the Windows target x86_64-windows-musl; a CN mirror may be the maintainer's own compat.py select: a change measured every member whenever anything under tests/openkal/ moved, so adding one member cost the whole list. It now measures every member only when the graph or the harness changes (an openkal family descriptor, pins.toml, compat.py); a members.toml edit measures the entries added or changed against the merge base (--base), a member's own test project measures that member, and a descriptor measures the members that depend on it, as before. The workflow passes the merge base and now also triggers on tests/examples/**. selftest pins each rule. The Windows target is x86_64-windows-musl. The graph presents musl's C environment there, and x86_64-windows-gnu read as a mingw-w64 build, which it never was. Measured locally with the pins (mcpp 2026.9.21.3, runtime 0.15.1): cli11, zlib and cmp-module run; curl stops at the same curl_setup.h:591; yaml-cpp and yaml-cpp-v080 run. Renaming the target moves the harness, so this pull request measures every member once, and that measurement becomes the published baseline. check_mirror_urls.lua required every CN url to live under gitcode mcpp-res. A library's maintainer may host the mirror instead; the rule is now a gitcode release asset under any owner. ZheFeng7110.boost's mirror (#463), which has kept lint red on main since, passes unchanged. * compat.yaml-cpp: 0.8.0's emitterutils.cpp gets <cstdint> on purpose, not by way of <format> src/emitterutils.cpp (0.8.0) names uint16_t/uint32_t and includes neither <cstdint> nor <stdint.h>; 0.9.0 added the include. Measured with gcc 15.1.0 over glibc 2.44: -std=c++17 fails with "'uint16_t' was not declared in this scope"; c++20 and c++23 compile because libstdc++'s <ostream> then reaches <format> -> bits/unicode.h -> <cstdint>. The package builds as c++23, so it held, on a transitive include. -include cstdint for the package's own TUs (32/32 and 31/31 in the compile database; the consumer's TU is untouched); both members pass on gcc 16.1.0/glibc, gcc 15.1.0/musl and llvm 22.1.8. * openkal compatibility: the measurement of 2026-09-23 Measured by openkal-compat run 35882195774 on this branch, with mcpp 2026.9.21.3, openkal-llvm-runtime 0.15.1 and llvm@22.1.8, the host's mingw headers installed, 32 members on x86_64-linux-gnu and x86_64-windows-musl. x86_64-linux-gnu: 30 run, 2 fail (curl and cmp-module, both declared not-portable). x86_64-windows-musl, through Wine: 30 run, 1 builds (mimalloc: its alloc test exits 1 under Wine), 1 fails (curl, declared). Against the published file of 2026-09-20 (runtime 0.12.0, mcpp 2026.9.18.3) no label is lower. archive, c-ares, doctest, spdlog and sqlite3 now run on Windows and expat on Linux, as docs/openkal-compat.md's 2026-09-21 section already described; yaml-cpp and yaml-cpp-v080 run on both targets. The Windows cells were recorded as x86_64-windows-gnu until this measurement.
1 parent 9c6ec87 commit 0d18e85

23 files changed

Lines changed: 1081 additions & 216 deletions
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# compat.yaml-cpp 0.8.0 / 0.9.0
2+
3+
## Shape
4+
5+
C++ source compat (Form B). Upstream's CMake target is `src/*.cpp` plus, with
6+
`YAML_CPP_BUILD_CONTRIB` at its default ON, `src/contrib/*.cpp`. No configure
7+
step, no generated header, no platform code in the library. 0.9.0 adds one TU
8+
(`src/fptostring.cpp`, over the vendored `src/contrib/dragonbox.h`) and one
9+
public header (`yaml-cpp/fptostring.h`); one glob covers both versions.
10+
11+
Tags are spelled differently upstream (`0.8.0`, `yaml-cpp-0.9.0`), so the wrap
12+
dirs differ (`yaml-cpp-0.8.0/`, `yaml-cpp-yaml-cpp-0.9.0/`); `*` absorbs both.
13+
14+
## Mirror
15+
16+
gitcode `mcpp-res/yaml-cpp`, releases `0.8.0` and `0.9.0`, assets byte-identical
17+
to the GitHub tag archives (sha256 checked after download from both sides; each
18+
GitHub archive downloaded twice, digest stable).
19+
20+
| version | sha256 |
21+
| --- | --- |
22+
| 0.8.0 | `fbe74bbdcee21d656715688706da3c8becfd946d92cd44705cc6098bb23b3a16` |
23+
| 0.9.0 | `25cb043240f828a8c51beb830569634bc7ac603978e0f69d6b63558dadefd49a` |
24+
25+
## YAML_CPP_STATIC_DEFINE
26+
27+
Upstream makes it a PUBLIC definition of a static build and reads it only in
28+
`include/yaml-cpp/dll.h`, which every public header reaches. A descriptor's
29+
`defines` are package-private, so `mcpp_generated/yaml-cpp/dll.h` defines it
30+
and `#include_next`s upstream's; `mcpp_generated` is first in `include_dirs`.
31+
The compile database confirms the consumer TU carries no `-D` for it, and the
32+
test's `#error` guard passes: the shim delivered it.
33+
34+
## Upstream defect found by the test
35+
36+
`GraphBuilderInterface` declares its destructor pure virtual and defines it
37+
nowhere, in both versions. Any derived class (upstream's own `GraphBuilder<Impl>`
38+
included) fails to link with `undefined symbol: ~GraphBuilderInterface()`
39+
unless its user defines it. The descriptor does not supply the definition: a
40+
consumer that already writes it would then get a duplicate symbol. The test
41+
writes it, as any consumer of the contrib API must.
42+
43+
## Features
44+
45+
None. Contrib is on by default upstream and is two small TUs; there is no
46+
optional component worth a gate.
47+
48+
## Verification
49+
50+
- `mcpp test -p yaml-cpp` / `-p yaml-cpp-v080` with the pinned mcpp 2026.9.18.3,
51+
cold: `test result ok`. Objects: 32 + test TU (0.9.0), 31 + test TU (0.8.0),
52+
equal to the source count.
53+
- 0.8.0 member asserts at compile time that `yaml-cpp/fptostring.h` is absent,
54+
so it cannot pass by silently resolving 0.9.0.
55+
- openkal: both members are listed in `tests/openkal/members.toml`. Locally,
56+
`x86_64-linux-gnu`: `runs (posix)` for both. The Windows leg is taken from
57+
the PR's openkal-compat run (a local run with an unpinned mcpp failed inside
58+
openkal-llvm-runtime's libunwind for the cli11 control member as well, so it
59+
says nothing about this package).

‎.github/workflows/openkal-compat.yml‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ on:
2525
paths:
2626
- "pkgs/**/*.lua"
2727
- "tests/openkal/**"
28+
- "tests/examples/**"
2829
- ".xpkgindex/openkal-compat.json"
2930
- ".github/workflows/openkal-compat.yml"
3031

@@ -68,15 +69,17 @@ jobs:
6869
with:
6970
fetch-depth: 0
7071

71-
# A pull request measures the members its change can affect; the schedule
72-
# and a request with no members measure every listed member.
72+
# A pull request measures the members its change can affect (see
73+
# `select_members` in compat.py: adding one member measures that member);
74+
# the schedule and a request with no members measure every listed member.
7375
- name: Select the members
7476
id: select
7577
shell: bash
7678
run: |
7779
if [ "${{ github.event_name }}" = "pull_request" ]; then
78-
files=$(git diff --name-only "origin/${{ github.base_ref }}...HEAD")
79-
members=$(python3 tests/openkal/compat.py select $files)
80+
base=$(git merge-base "origin/${{ github.base_ref }}" HEAD)
81+
files=$(git diff --name-only "$base" HEAD)
82+
members=$(python3 tests/openkal/compat.py select --base "$base" $files)
8083
else
8184
members="${{ github.event.inputs.members }}"
8285
[ -n "$members" ] || members=$(python3 tests/openkal/compat.py select tests/openkal/)

0 commit comments

Comments
 (0)