feat(ftxui): add 7.0.3 - #292
Merged
Merged
Conversation
Source layout is unchanged (include/ftxui + src/ftxui/{screen,dom,
component,util}), so the 6.1.9 globs apply verbatim, and the public header
API the core smoke test uses (hbox/text/separator, Dimension::Fit,
Screen::Create(Dimensions, Dimensions), Render) is source-compatible with
6.1.9. Upstream added C++20 module units (src/ftxui/*.cppm,
FTXUI_BUILD_MODULES off by default); the `*.cpp` globs never match them.
7.0.3 ships 47 *_test.cpp / 6 *_fuzzer.cpp, still covered by the existing
exclusions.
One skew the globs cannot express (no per-version build blocks,
mcpp-community/mcpp#290): FTXUI 7 moved Loop's method definitions from
loop.cpp into app.cpp and dropped loop.cpp from the CMake build, but the
stale file still ships in the 7.0.3 tarball. Compiling both duplicates
Loop::{~Loop,RunOnce,...} at the consumer's link (a dependency's objects
all enter the link — no lazy archive selection). 6.1.9 has no app.cpp and
genuinely needs loop.cpp, so a small install() hook (same normalisation
pattern as compat.eui-neo) deletes loop.cpp only when app.cpp exists —
exactly the 7.x layout.
No CN mirror yet (never published to mcpp-res); plain-string GLOBAL
fallback, same as eui-neo 0.5.7. sha256 double-checked against the GitHub
tag archive.
Verified locally (mcpp 2026.8.29.1): `mcpp test -p core` passes on both
7.0.3 and 6.1.9 (the latter through the new hook, confirming loop.cpp is
kept there); check_mirror_urls, check_package_name,
check_platform_version_parity, check_duplicate_versions,
check_cross_package_refs and `mcpp xpkg parse` all green.
Upstream's new C++20 module units (src/ftxui/*.cppm) join the sources, so 7.0.3 consumers can `import ftxui;` — they are global-fragment includes + `using` re-exports, every declaration stays attached to the global module, and `#include`/`import` mix freely against the same compiled objects. On 6.1.9 the .cppm globs are zero-hit warnings (redis-plus-plus union precedent). A new CompatModule smoke test imports ftxui and renders. Verified locally (mcpp 2026.8.29.1): `mcpp test -p core` passes on 7.0.3 (both #include and `import ftxui;` smoke tests) and on 6.1.9 (loop.cpp kept, zero-hit .cppm globs are warnings); `mcpp xpkg parse` green.
…;` works" This reverts commit dd44f8e.
Sunrisepeak
requested changes
Sep 1, 2026
|
|
||
| import("xim.libxpkg.pkginfo") | ||
|
|
||
| function install() |
Member
There was a problem hiding this comment.
这里看 install hook 只是移动了目录, 好像没有其他额外功能,是不是可以省去
Collaborator
Author
There was a problem hiding this comment.
这个 hook 除了保持默认解包目录结构外,还会在检测到 7.x 的 app.cpp 时删除 tarball 中遗留的 loop.cpp。FTXUI 7.0.3 同时编译 app.cpp 和 loop.cpp 会产生 Loop::* 重复定义,而 6.1.9 仍然需要 loop.cpp。目前描述符还不能按版本声明不同的 sources(mcpp-community/mcpp#290),所以暂时需要在 install hook 中处理这个版本差异。这里的目录移动是自定义 install hook 接管默认安装流程后,为保持原有 */ glob 解包结构所需的。基于这个兼容约束,是否可以保留该 hook?我也可以进一步精简注释,让删除 loop.cpp 的目的更突出。
Sunrisepeak
pushed a commit
that referenced
this pull request
Sep 1, 2026
FTXUI 7 ships upstream's own module units — an `ftxui` umbrella re-exporting ftxui.component/.dom/.screen/.util — and #292 left them out after an unconditional attempt went red on the linux gcc leg. They come back here behind an opt-in `modules` feature whose source list is exactly upstream's cmake/ftxui_modules.cmake: five .cppm, a pure addition that cannot collide with the base **/*.cpp globs, so the default build does not move (76 compiled units without the feature, 81 with). What that gcc leg was reporting is narrower than "GCC 16 cannot consume these modules". The sub-modules put the public headers, and transitively libstdc++, into a global module fragment, so a consumer TU that writes `import ftxui;` AND textually #includes a standard header hands gcc two copies of the standard library and it refuses — redefinition of std::__terminate, conflicting declaration of std::allocator / std::char_traits. #292's smoke TU did exactly that, and the only object that failed there was that TU's own (obj/module.o), after the package's five module units had already compiled. clang accepts the mixed TU, which is why only gcc went red. Kept off the textual surface, the units build and run on gcc 16.1.0 and llvm 22.1.8 alike, so tests/examples/ftxui-module needs no toolchain pin and runs on both linux legs: `import ftxui;` with a real render, plus each sub-module imported alone, every TU on the module surface and not one textual include. The `modules` export list is documentation, not a guard: mcpp validates [modules].exports only for a build's PRIMARY manifest, never for a dependency's — measured by deleting one name and rebuilding with the package cache bypassed, which passed. Verified (mcpp 2026.8.27.2, the version CI pins): ftxui-module 5 passed on both toolchains; `mcpp test -p core` green; the same import with the feature off fails with `module 'ftxui' not found`; 6.1.9 and the 7.0.3 header path unaffected; check_mirror_urls, check_package_name, check_platform_version_parity, check_duplicate_versions, check_cross_package_refs and `mcpp xpkg parse` over all 175 descriptors green. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
What
Adds FTXUI 7.0.3 (latest upstream release, 2026-08-06) alongside the existing 6.1.9, and bumps the
coresmoke member to it.Descriptor impact
include/ftxui+src/ftxui/{screen,dom,component,util}, so the 6.1.9 globs apply verbatim. Test/fuzzer exclusions still cover 7.0.3's 47*_test.cpp/ 6*_fuzzer.cpp.hbox/text/separator,Dimension::Fit,Screen::Create(Dimensions, Dimensions),Render) —runtime.cppneeds no change..cppmunits, and an earlier revision of this PR compiled them (import ftxui;worked on the llvm/macos/windows legs). The linux GCC leg failed: upstream's units put libstdc++ headers textually in the global module fragment, and GCC 16 cannot consume overlapping GMFs from the four sub-module BMIs (redefinitions ofstd::__terminate,std::allocator, …). Upstream's own CI builds modules llvm-only (# TODO add gcc / msvcin build.yaml), so the module units stay out until upstream supports more than clang.The one skew:
loop.cppFTXUI 7 moved
Loop's method definitions fromloop.cppintoapp.cppand droppedloop.cppfrom the CMake build — but the stale file still ships in the 7.0.3 tarball. Our glob compiles it, duplicatingLoop::{~Loop,RunOnce,...}at the consumer's link (a dependency's objects all enter the link; no lazy archive selection). 6.1.9 has noapp.cppand genuinely needsloop.cpp, and there are no per-version build blocks yet (mcpp-community/mcpp#290).Fix: a small
install()hook (same normalisation pattern ascompat.eui-neo) deletesloop.cpponly whenapp.cppexists — exactly the 7.x layout — keeping 6.1.9 intact.CN mirror
Not published to mcpp-res; plain-string GLOBAL fallback (same precedent as eui-neo 0.5.7). sha256 double-checked against the GitHub tag archive:
e7c62ffe19009759821b4f0f8df7f2a6fb83784c3a9f1477d81f56d3ee723c88.Local verification (mcpp 2026.8.29.1)
mcpp test -p core→ ok on 7.0.3 (ftxui builds, smoke assertions pass)mcpp test -p corere-pointed at 6.1.9 → ok through the new hook (loop.cpp kept)check_mirror_urls,check_package_name,check_platform_version_parity,check_duplicate_versions,check_cross_package_refs,mcpp xpkg parse— all green