feat: run command revamp - #37
Merged
Merged
Conversation
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.
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.
No description provided.