Skip to content

Ariadne terminal backends on macOS and Windows; tvision in the published libcvc - #720

Merged
transfix merged 8 commits into
masterfrom
feat/tui-macos-windows
Oct 20, 2026
Merged

transfix merged 8 commits into
masterfrom
feat/tui-macos-windows

Conversation

@transfix

@transfix transfix commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Builds, tests and ships the Ariadne terminal backends on macOS and Windows, and puts tvision into the published libcvc.

Before this, the libcvc recipe scoped ftxui to linux (the stale "#111 linux only" note). So the published macOS and Windows libcvc, and the macOS/Windows CI lanes, built the stub backend, and the 42 AriadneFtxui tests reported Skipped there. tvision was in no published libcvc.

Recipe (cvcpkg/recipes/libcvc)

  • ftxui → [linux, macos, windows, wasm-mt]; nlohmann-json and json-schema-validator → [linux, macos, windows].
  • tvision: a build dep on [linux, macos, windows]. It is a static archive linked PRIVATE and BUILD_INTERFACE-only, so nothing of it reaches the exports.
  • ncurses: a runtime dep on [linux, macos] (libncursesw plus the terminfo database).
  • Every listed dep has a bundle on every listed platform tuple. These were published for this PR:

CMake (src/cvc/CMakeLists.txt)

  • WIN32 skips the ncursesw lookup. The Windows tvision draws through the Win32 console.
  • Under MSVC, ariadne/tvision_backend.cpp gets the flags tvision's own config makes PUBLIC: /permissive- /Zc:__cplusplus /Zc:externConstexpr /Zc:inline. Without /Zc:__cplusplus, tvision/ttypes.h #defines constexpr, noexcept and thread_local away.

Terminfo (TvisionBackend::run)

use_bundled_terminfo() moves out of src/ari/main.cpp into TvisionBackend::run, before tvision starts ncurses.

  • dladdr locates libcvc's own library. When TERMINFO_DIRS is unset and <libdir>/../share/terminfo exists, it becomes TERMINFO_DIRS (with a trailing :).
  • So every host (ari, arigl, cvcGL's ariadne_terminal) gets it on Linux, macOS and the BSDs. Before, only ari did, and only on Linux.
  • ari's behaviour is unchanged: same rule, and in a cvcpkg install the same prefix.

Publish (.github/workflows/publish-cvcpkg.yml)

  • Each libcvc configure is teed, and a new step fails the job if the log lacks Ariadne: .ari YAML loader ENABLED, Ariadne: FTXUI terminal backend ENABLED or Ariadne: tvision terminal backend ENABLED. It runs before the long build, as ci.yml's ari-wasm guard does.
  • ari on macOS and Windows:
    • the recipe gains macos and windows entries, files: [bin/ari*], and a new build.ps1 (cvc-cli's pattern, pointed at src/ari);
    • the workflow gains macOS (bash) and Windows (pwsh) twins of the Linux ari step. They sit last in the build job because they take cmake/ninja from cvcpkg (cvcpkg-build-tools), which prepends PATH;
    • every ari step, Linux included, now renders terminal_tour.ari with the binary it is about to pack.
  • The published Windows libcvc already carries bin/cvc.dll beside its dependency DLLs (checked by installing it), so bin/ari.exe resolves in a flat prefix.

CI (.github/workflows/ci.yml)

  • The package-linux/macos/windows lanes tee their configure, and a new step fails the lane when it lacks Ariadne: FTXUI terminal backend ENABLED or Ariadne: tvision terminal backend ENABLED. A stub backend otherwise turns the AriadneFtxui/AriadneTvision tests into skips, which is how macOS and Windows ran them until now.
  • The stale fix(volume): writeVolumeFile(app, vol, filename) creates a missing target #111 comment is fixed. The file is edited byte-exactly (CRLF kept).

Not touched

src/cvc/ariadne/ftxui_backend.cpp is not changed. (Another branch is editing it.)

Verified locally (Linux, Ninja, Release, shared)

  • Configure prints FTXUI, tvision, YAML and Layer-2 all ENABLED. ariadne_ftxui_test: 42/42, including AriadneTvision.IsTheHostedFtxuiBackend.
  • A relocated, flat prefix (cmake --install, the resolved deps copied in, ncurses' share/terminfo, then mv to a new path), with an extra terminfo entry ari-reloc compiled only into that prefix's database. In tmux with TERMINFO_DIRS unset, TERM=ari-reloc ari run --backend tvision terminal_tour.ari drew the tvision desktop. strace shows ncurses opening reloc2/bin/../lib/../share/terminfo/a/ari-reloc, and two Ctrl-Cs exited 0. With a user-set TERMINFO_DIRS=/nonexistent it is left alone: ncurses fails on ari-reloc (exit 1).
  • clang-format 18.1.8 (cvcpkg) is clean on changed lines.

CI to watch

macOS and Windows package-* lanes should now print Ariadne: FTXUI terminal backend ENABLED, and run the AriadneFtxui/AriadneTvision tests instead of skipping them. master's known macOS failure DynBike.KinematicLimitFollowsBikeStep is fixed by #717, not here.

cvcpkg install ari on macOS and Windows needs a publish-cvcpkg dispatch after merge.

…vision on WIN32

The libcvc recipe scoped ftxui (and the .ari Layer-2 schema deps) to linux, so
every macOS and Windows libcvc, and the macOS / Windows CI lanes, built the stub
terminal backend; the AriadneFtxui tests reported Skipped there. ftxui,
nlohmann-json and json-schema-validator are published for linux, macOS (arm64,
x86_64) and windows, so declare them there.

tvision was in no published libcvc. Add it as a build dep (a static archive,
linked PRIVATE and BUILD_INTERFACE-only) on linux, macos and windows, and
ncurses as a runtime dep on linux and macos (libncursesw + the terminfo
database). The Windows tvision (cy-pca/cvcpkg#414, tvision cvc.3) draws through
the Win32 console, so src/cvc/CMakeLists.txt skips the ncursesw lookup on WIN32.
Under MSVC tvision_backend.cpp gets the flags tvision's config makes PUBLIC:
without /Zc:__cplusplus, tvision/ttypes.h #defines constexpr, noexcept and
thread_local away.

Also drops the stale #111 notes in ci.yml and the tvision test.
ari pointed ncurses at <prefix>/share/terminfo from its own executable path, and
only on Linux. Other hosts (arigl, cvcGL's ariadne_terminal) did not, and the
cvcpkg ncurses bundle's compiled-in search path names the builder's /tmp prefix.

TvisionBackend::run now does it before tvision starts ncurses: dladdr locates
libcvc's own library, and TERMINFO_DIRS becomes <libdir>/../share/terminfo: when
it is unset and that directory exists. Every host gets it, on Linux, macOS and
the BSDs. ari's behaviour is unchanged (same rule, same prefix in a cvcpkg
install); its copy is removed.
publish-cvcpkg.yml tees each libcvc configure and fails the job when it lacks
'Ariadne: .ari YAML loader ENABLED', 'Ariadne: FTXUI terminal backend ENABLED' or
'Ariadne: tvision terminal backend ENABLED', so a stub can no longer ship
silently (like ci.yml's ari-wasm guard).

ari: macos and windows matrix entries, files bin/ari*, and build.ps1 (cvc-cli's
pattern, pointed at src/ari). The workflow gains macOS (bash) and Windows (pwsh)
twins of the Linux ari step, taking cmake and ninja from cvcpkg. Each ari step,
Linux included, now renders the terminal tour with the binary it is about to
pack before packing it.
Without ftxui or tvision the Ariadne terminal backends compile to stubs and the
AriadneFtxui / AriadneTvision tests skip rather than fail, which is how the
macOS and Windows lanes ran them until now. Tee each package-* configure and
fail when it lacks 'Ariadne: FTXUI terminal backend ENABLED' or 'Ariadne:
tvision terminal backend ENABLED'.
Leaves the __linux__ includes and the call site's surroundings as they were, so
this merges cleanly with the arigl branch's rewrite of ari's argument parsing.
Whichever lands second drops the now-unused includes.
The Windows ftxui export puts /utf-8 in the INTERFACE_COMPILE_OPTIONS of
ftxui::screen, ::dom and ::component. Linked into cvc, it reached the CUDA
sources too, and nvcc took the bare /utf-8 for a second input file: "nvcc
fatal : A single input file is required for a non-link phase when an
outputfile is specified" (package-windows / libcvc-release-grpc-static).
Wrap each of FTXUI's options in $<$<COMPILE_LANGUAGE:CXX>:...>, as cvc already
does for -openmp:llvm.
@transfix
transfix merged commit 51e4041 into master Oct 20, 2026
24 checks passed
@transfix
transfix deleted the feat/tui-macos-windows branch October 20, 2026 15:21
transfix added a commit that referenced this pull request Oct 20, 2026
#732)

StateTransportIpcTest.ThreeEndpointFanOut failed on CI (#720,
recipe / ubuntu-latest / Debug): after wait_for_received(1) returned, node B's
"fan" was still "". The IPC reader bumped _recv_mutations before
dispatch_inbound() applied the mutation to the shards, so wait_for_received()
could return while the value was still in flight. OOB messages had the same
order. state_transport_grpc already counts after dispatching.

Count after dispatch, so wait_for_received*() returning means the receiving
shards have applied what it counted. The counters are diagnostics; nothing
but the waits reads them.

Reproduced on master: 16 concurrent copies x 300 repeats of the test failed
5 of 4800 times, every time with "". With the fix: 16 x 1000 passed 16000 of
16000, and the whole StateTransportIpcTest suite, 32 copies x 200 repeats,
passed 115200 of 115200. The other suites that use the IPC transport pass.
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.

1 participant