|
| 1 | +# Design doc: bump `compat.eui-neo` to 0.6.2 |
| 2 | + |
| 3 | +Date: 2026-10-30 |
| 4 | + |
| 5 | +Follow-up to `.agents/docs/2026-10-14-bump-eui-neo-0.6.1-plan.md` and commit `725ca5d` (0.6.1). |
| 6 | +Upstream released 0.6.2; this bumps the index from 0.6.1 to 0.6.2. |
| 7 | + |
| 8 | +## Source and version |
| 9 | + |
| 10 | +| | | |
| 11 | +|---|---| |
| 12 | +| Upstream | `https://github.com/sudoevolve/EUI-NEO` | |
| 13 | +| Version | `0.6.2` (latest release) | |
| 14 | +| Tarball | `archive/refs/tags/v0.6.2.tar.gz` | |
| 15 | +| sha256 | `189d97aadb044de653237e12ac97d6fa92f1a65952854e3db6211d360f4d4124` (computed twice — local download and a second fresh download, stable) | |
| 16 | +| Wrap dir | `EUI-NEO-0.6.2/` — absorbed by the existing `install()` hook (`normalise_layout`) | |
| 17 | +| CN mirror | **pending** — no `mcpp-res` write access on this machine; plain-string url fallback per SOP | |
| 18 | +| License | Apache-2.0 (unchanged) | |
| 19 | + |
| 20 | +## What changed upstream (0.6.1 → 0.6.2) |
| 21 | + |
| 22 | +Release notes: `docs/releases/v0.6.2.md` (SDL2 single-finger touch input, |
| 23 | +pixel-granular `ScrollEvent::pixelX/pixelY`, Markdown viewport-only builds, |
| 24 | +glyph-advance caching, on-demand glyph-atlas allocation, ~8 MB text-memory |
| 25 | +win, software-renderer TODO doc). |
| 26 | + |
| 27 | +- **`CORE_SOURCES` and `VULKAN_SOURCES` are byte-identical to 0.6.1** |
| 28 | + (extracted and diffed from both `CMakeLists.txt`). No new files under |
| 29 | + `core/`; the changed files are internals (`text.cpp/h`, `opengl_text.cpp`, |
| 30 | + `vulkan_text.cpp`, input headers, `render_backend.h`, `dsl_runtime.h`, |
| 31 | + runtime headers, `components/markdown.h`, `sdl2_app_main.cpp` + a new |
| 32 | + `<unordered_map>` include) and app/test/doc material. The lib's source |
| 33 | + list, deps, features and flags carry over unchanged. |
| 34 | +- `components/markdown.h` still guards its body on `EUI_HAS_MD4C` — the |
| 35 | + `markdown` feature is unchanged. |
| 36 | +- `sdl2_app_main.cpp` (the `app-main-sdl2` feature TU) gains one STL include |
| 37 | + only — no descriptor impact. |
| 38 | +- **The one descriptor-relevant change**: upstream fixed the 0.6.1 |
| 39 | + `sendX11MoveResizeForWindow` breakage this index worked around in |
| 40 | + `mcpp_eui_backends.h`. In 0.6.1 the SDL2 branch's definition sat INSIDE |
| 41 | + `#if __linux__ && !__ANDROID__ && defined(SDL_VIDEO_DRIVER_X11)` while |
| 42 | + `beginWindowMove`/`beginWindowResize` called it unguarded; 0.6.2 moved the |
| 43 | + `#endif` from below the definition to above it (verified by diffing |
| 44 | + `core/window/window_backend.cpp` across the two extracted tags), so the |
| 45 | + definition is now unguarded — with the X11 specifics still inside the |
| 46 | + guard and an `#else return false` body, exactly like the GLFW branch. |
| 47 | + |
| 48 | +## The shim problem this creates |
| 49 | + |
| 50 | +The 0.6.1 workaround's non-linux arm is a package-private stub: |
| 51 | + |
| 52 | +```cpp |
| 53 | +namespace core::window { |
| 54 | +inline bool sendX11MoveResizeForWindow(void* window, int direction) { … } |
| 55 | +} |
| 56 | +``` |
| 57 | +
|
| 58 | +On 0.6.2 non-linux, upstream's now-unguarded real definition reaches the |
| 59 | +same TU → **redefinition** (measured: compile of the 0.6.2 member against |
| 60 | +the unmodified 0.6.1-era header fails). Version-gating the generated header |
| 61 | +from the descriptor is not expressible: the xpkg parser accepts only literal |
| 62 | +strings in `generated_files` — a concatenated Lua value fails with |
| 63 | +`malformed mcpp segment` (measured with a probe package on mcpp |
| 64 | +2026.10.1.2), so `pkginfo.version()` cannot select header content, and no |
| 65 | +per-version `mcpp` override exists in the schema. |
| 66 | +
|
| 67 | +**Fix: the stub became a function template.** |
| 68 | +
|
| 69 | +```cpp |
| 70 | +namespace core::window { |
| 71 | +template <typename W> |
| 72 | +inline bool sendX11MoveResizeForWindow(W* window, int direction) { … } |
| 73 | +} |
| 74 | +``` |
| 75 | + |
| 76 | +- 0.6.1 non-linux: the definition is guard-hidden, the template is the only |
| 77 | + candidate, the unguarded uses at :567/:571 resolve to it. Compiles and |
| 78 | + links (weak inline symbol). |
| 79 | +- 0.6.2 non-linux: the real non-template definition precedes the uses; the |
| 80 | + call is an exact-match tie between template (W deduces to void, `Handle` |
| 81 | + is `void*` in the SDL2 branch) and non-template — non-template wins — and |
| 82 | + the template goes unused. A template and a non-template of the same name |
| 83 | + coexist, so there is no redefinition. |
| 84 | +- linux (both tags): the linux arm still defines `SDL_VIDEO_DRIVER_X11=1` |
| 85 | + for the package's own TUs. On 0.6.1 that wakes the guard holding the real |
| 86 | + definition (non-template wins over the template — fine). On 0.6.2 it wakes |
| 87 | + the self-contained `X11ResourceApi` block (which self-includes |
| 88 | + `<SDL_syswm.h>`/`<X11/Xresource.h>` inside the guard) and the guarded |
| 89 | + branch of `sendX11MoveResizeForWindow`/`x11ContentScale`; runtime-safe |
| 90 | + under compat.sdl2 (dummy+offscreen — no SDL window is ever an X11 window, |
| 91 | + and `x11ResourceApi()` fails its `available()` check without libX11). |
| 92 | + |
| 93 | +Mechanism verified with g++ -std=c++17 mini-repros that model each tag's |
| 94 | +exact structure (guard-hidden vs unguarded definition), force-including the |
| 95 | +extracted shim header: |
| 96 | + |
| 97 | +- 0.6.1 shape, simulated non-linux (`-U__linux__`): compiles+links, template |
| 98 | + emitted (`nm`: weak `sendX11MoveResizeForWindow<void>`), picked at runtime. |
| 99 | +- 0.6.2 shape, simulated non-linux: compiles+links, exit code proves the |
| 100 | + real definition (returns true) won over the template (returns false). |
| 101 | +- 0.6.1 linux shape (macro woken): real in-guard definition wins, exit code |
| 102 | + proves it. |
| 103 | +- Negative control: 0.6.1 shape WITHOUT the shim fails to compile |
| 104 | + ('core' undeclared), matching the original 0.6.1 failure. |
| 105 | + |
| 106 | +## Version bumps |
| 107 | + |
| 108 | +- `pkgs/e/compat.eui-neo.lua`: 0.6.2 entries on linux/macosx/windows, |
| 109 | + plain-string GLOBAL url (no CN mirror yet), plus the file-top version note. |
| 110 | +- Member pins `0.6.1` → `0.6.2` in all seven `tests/examples/eui-neo*` |
| 111 | + members (the pins are floors; resolution picked 0.6.1 over 0.6.2 until |
| 112 | + raised — same pattern as the 0.6.1 bump). |
| 113 | + |
| 114 | +## Local verification (mcpp 2026.10.29.1, xlings 2026.10.26.1) |
| 115 | + |
| 116 | +- `eui-neo-sdl2`, `eui-neo-vulkan`, `eui-neo-app-main`, `eui-neo-markdown`, |
| 117 | + `eui-neo-tray`, `eui-neo-window`: **test result ok** (each builds |
| 118 | + compat.eui-neo 0.6.2 and runs). The sdl2 member is the one that exercises |
| 119 | + the reworked shim path on linux. |
| 120 | +- `eui-neo` (base member): compat.eui-neo 0.6.2 compiles and links (27 |
| 121 | + units), but the post-link runtime-closure check fails on this machine: |
| 122 | + `libffi.so.8` is not on the artifact's search path. This is pre-existing |
| 123 | + environment rot, not a 0.6.2 regression: the 0.6.1 build fails the same |
| 124 | + check here (measured before the bump), the subos library view at |
| 125 | + `~/.mcpp/registry/subos/default/lib` still carries `libffi.so.7` while the |
| 126 | + index resolves `xim:libffi@3.4.4` (which ships `.so.8`), and |
| 127 | + `xlings install/update xim:libffi` both report "already installed" without |
| 128 | + repointing the view. CI's fresh containers are authoritative for the run. |
| 129 | +- `mcpp xpkg parse` on the descriptor: OK. Lint equivalents (mirror urls, |
| 130 | + platform parity, duplicate versions) pass locally. |
| 131 | + |
| 132 | +## Notes |
| 133 | + |
| 134 | +- The `mcpp` segment stays version-independent; one header now serves every |
| 135 | + published tag (0.5.3 through 0.6.2). |
| 136 | +- The 0.6.1-era comment block in the descriptor was updated, not removed — |
| 137 | + the template trick only makes sense with the 0.6.1 history in view. |
0 commit comments