Skip to content

fix: the pin is not a floor, and stop demanding CMake and cpanm - #51

Merged
ralyodio merged 1 commit into
mainfrom
demo-system-fix
Sep 7, 2026
Merged

fix: the pin is not a floor, and stop demanding CMake and cpanm#51
ralyodio merged 1 commit into
mainfrom
demo-system-fix

Conversation

@ralyodio

@ralyodio ralyodio commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

--system was unusable on any machine that was not already pinned, which is every stock Mac. Reported as "I have to use --mise perl always".

Three separate causes.

The pin was treated as a floor

The version gate in #50 compared the resolved tool against the mise pin. So system Perl 5.40 was refused against a 5.44 pin, and Ruby 3.3 against 4.0.6, even though both build these bindings perfectly well. That is a regression from #50 and it defeated the point of the flag.

The gate now fails only below the version the port itself declares it needs, and merely mentions anything between that floor and the pin:

hqtui-demo: Building with your perl 5.40.1; this revision pins perl 5.44.0.0.
            Rerun with --mise if the build fails.

Floors come from each port's own manifest: ports/go/go.mod (1.22), Cargo.toml rust-version (1.75), requires-python (3.10), hqtui.gemspec (3.1), composer.json (8.1), Makefile.PL MIN_PERL_VERSION (5.20), cmake_minimum_required (3.20). Bun keeps a real floor of 1.4.0, since 1.3 genuinely cannot parse a lockfileVersion: 2 bun.lock — the bug #50 was opened for, still caught:

hqtui-demo: …/bun/1.3.14/bin/bun is 1.3.14, and this demo needs bun 1.4.0 or newer.

CMake was mandatory

CMake is a build tool for the native binding, not the language runtime --system is about, and the C++ compiler still comes from the host. When the host has no CMake and mise is installed, the pinned one is now borrowed with a note instead of refusing to run. With no mise, the message names the actual command for that platform (brew install cmake on Darwin).

macOS ships Perl but no cpanm

--system perl died at cpanm: not found before building anything. The standalone installer is now fetched into the private demo cache, the same place FFI::Platypus already went. Nothing global is touched, and the failure message no longer asks for a manual step.

Verified

On a box whose system Perl (5.40.1) and Ruby (3.3.8) are both below the pins, with no CMake and no cpanm on PATH:

  • --system perl borrows the pinned CMake, fetches cpanm, builds FFI::Platypus and the native binding, and renders the dashboard.
  • --system ruby renders the dashboard.
  • --system typescript with Bun 1.3.14 still fails, with the message naming both versions.

15/15 updater tests, sh -n, dash -n, and shellcheck -s sh (only the pre-existing SC2016 at the perl -MConfig line).

test_declared_floors_match_the_ports_own_manifests reads the floors back out of demo.sh and compares each against the manifest that states it, so a port raising its requirement cannot leave the launcher starting a build that cannot succeed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TbGYCRHZsZUsQwRCLafhMF

Three things made `--system` unusable outside a machine that was already
pinned, which is every stock Mac:

The version gate I added compared against the mise pin, so system Perl
5.40 was refused against a 5.44 pin and Ruby 3.3 against 4.0.6, even
though both build the bindings perfectly well. The gate now fails only
below the version the port itself declares (go.mod, Cargo.toml
rust-version, requires-python, the gemspec, composer.json,
MIN_PERL_VERSION, cmake_minimum_required) and merely says something
between that and the pin. Bun keeps a real floor of 1.4.0, because 1.3
cannot parse a lockfileVersion 2 bun.lock.

CMake is a build tool for the native binding, not the runtime `--system`
is about, so when the host has none and mise is installed the pinned one
is borrowed rather than refusing to run. Without mise the message now
names the actual command to run on that platform.

macOS ships Perl but no cpanm, which stopped `--system perl` before it
built anything. cpanm is now fetched into the private demo cache, the
same place FFI::Platypus already went. Nothing global is touched.

Verified on a box whose system Perl (5.40.1) and Ruby (3.3.8) are both
below the pins: both now build the native binding and render the
dashboard with no mise runtime. A new test checks the declared floors
against the ports' own manifests so they cannot drift.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbGYCRHZsZUsQwRCLafhMF
@ralyodio
ralyodio merged commit 7087031 into main Sep 7, 2026
13 checks passed
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