Skip to content

feat: run command revamp - #37

Merged
savruun merged 5 commits into
masterfrom
feat/run-command-default
Aug 5, 2026
Merged

feat: run command revamp#37
savruun merged 5 commits into
masterfrom
feat/run-command-default

Conversation

@savruun

@savruun savruun commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

No description provided.

savruun added 5 commits August 4, 2026 20:50
The repo moved from luaupm/cli to luaupm/lpm. This is the readme link,
the crate metadata and the test fixtures that still had the old path in
them.
cargo publish refuses to run when the working tree has files that are not
committed, and the log it was writing was one of them, so the last
release died right at that step. It goes in RUNNER_TEMP now.
Copying onto the binary fails with Text file busy if anything is running
it, which happens the moment you have a lpm run going in another
terminal. The new binary lands next to the target now and gets renamed
over it. Whatever is running keeps the old file and finishes fine, and
the next run picks up the new one. lpx gets the same treatment since an
lpx elsewhere holds it the same way.
Two things here.

Running lpm run on its own used to be an error about a missing argument.
It prints what the project has now, grouped by how you reach each one so
you can tell a Lifecycle Script from a plain one without opening
lpm.toml. A name only counts as a Hook when the part after pre or post
actually names another script or one of the commands, so a script called
prelude stays a script and a prebuild with no build does too, since that
one can never fire on its own.

A script can also be a list now.

  serve = ["larvae process -w", "rojo serve .larvae/build.project.json"]

Every command starts at the same time and each line is tagged with the
number of the command it came from, like the concurrently package. There
is a blank line whenever the output switches between them. One command
failing does not stop the rest, it says which one died and what code it
gave, and lpm exits with the first failure. An empty list is an error
rather than a script that quietly does nothing.

On mac and linux each command gets a real terminal so colour survives.
Most tools decide by asking whether they are on a terminal and ignore the
colour env vars entirely, so there was no other way to keep it. The cost
is that a terminal only has one stream, so stdout and stderr come back
merged. Redirecting lpm somewhere drops back to pipes, which keeps logs
clean and keeps the two apart. Windows stays on pipes for now.
Apple declares the termios and winsize arguments of openpty as *mut
where glibc declares them *const, so every macos job failed to compile
while linux stayed green. A *mut coerces to a *const and not the other
way round, so passing both as *mut is what builds everywhere.

The winsize goes in as a raw pointer rather than a mutable borrow
because clippy reads the glibc signature and calls the borrow
unnecessary, which it is on linux and is not on macos.
@savruun
savruun merged commit 8222de7 into master Aug 5, 2026
9 checks passed
@savruun
savruun deleted the feat/run-command-default branch August 5, 2026 02:05
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