refactor(cmd): back generic execution with shellout (#20) - #34
Merged
Conversation
6 tasks
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.
Summary
Resolves #20 by backing generic command execution with the maintained
shelloutpackage instead of the bespoke
cmd_ffishell wrapper, reducing custom FFIsurface while preserving the public API and cross-platform behavior.
Changes
shellout ~> 1.8.0dependency; routecmd.execthroughshellout'ssynchronous
command./bin/sh -cComSpec /d /s /ccmd.exec(command:) -> Result(Nil, CommandError)CommandFailed("execute command", reason)src/glendix/command.gleam(+ FFI) as the focused execution module,with a contract test that verifies the
shellout.LetBeStdoutSIGINT listeneris cleaned up after a command completes.
shellout/plinthdo not fit(Gleam warning filtering), documented in the READMEs (en/ko/ja).
Design notes
plinth/node/child_processwas not adopted: it lacks synchronous completion,typed exit status, and typed stdio results needed here.
intentionally left as custom.
Verification
gleam format --check,gleam check,gleam build --warnings-as-errors,gleam docs build— passgleam test --runtime bun— 142 passed, no failures./scripts/verify.sh final(family-wide) — pass, including:.mpkbuild (com.glendix.family.GlendixLustreWidget)BUILD SUCCEEDED+ post-boot browser smoke checkglendix -> mendrawremains Hex;pushed-commit dependency check passes.
Closes #20