What you really want is a way for scripts to describe their dependencies, and then the runner figures out what order to run them in, and cache scripts that don't need to be run because their inputs didn't change.
Wireit[1] is an npm script runner that adds that incrementally on top of package.json. I can't manage an npm monorepo without it now.
Deno started integrating the idea directly into their built-in script runner. I think this is an important enough feature that more runtimes should follow Deno's lead.
DAG + content-addressing, final binary being the target and everything resolved from there. We could have some beautiful build system that just works and is fast, but seems it never magically appears by itself although it seems so elegant. Guess Nix/NixOS is the closest we've gotten so far, works well enough, missing concurrency and parallelism though.
Gazelle, the BUILD file generator for Go, now supports plugins and several other languages have Gazelle plugins.
I’ve used AI to generate BUILD file generators before, though. I had good luck getting it to write a script that would analyze a Java project with circular dependencies and aggregate the cycle participants into a single target.
I don’t like generative AI for rote tasks like this, but I’ve had good luck using generative AI to write deterministic code generators that I can commit to a project and reuse.
But now we would need each script to independently do their own caching, which isn’t all bad. At least you have more cross runner compatibility and resilience
(trap 'kill 0' INT TERM; cmd1 & cmd2 & cmd3 & wait)
Or, for 1+2 sequentially, in parallel with 3+4 sequentially: (trap 'kill 0' INT TERM;
(cmd1 && cmd2) &
(cmd3 && cmd4) &
wait
)
(To oversimplify: The trap propagates the signal (with 'kill') to the process group 0 made by the () parens; this only needs to be set at the top level. & means run in background, && means run and continue only on success.)There are other reasons one might not want to depend on bash, but it's not something to be afraid of!
Git bash exists on windows and is perfectly usable.
Seriously, my number one windows shell is WSL. Distant second and third are cmd and powershell which I only use to diagnose WSL issue.
At this point you don't need most things...
1. Minor speed boost from not needing bun multiple times (or extract the build/test/lint commands from package.json).
2. You can query/filter commands. E.g. run all my tests (both unit and integration).
3.You avoid needing a separate Bash install (for Windows).
Programming talks about parallelism or concurrency or threading. (single-threading, multi-threading)
Or synchronous and asynchronous.
The legal system talks about concurrent and consecutive.
Process descriptions might use "sequential" rather than consecutive or series.
"Linear" is another possibility, but it's overloaded since it's often used in reference to mathematics.
"Sequential" feels more appropriate to me for the task runner scenario where we wait for one task to finish before running the next.
"Series" suggests a kind of concurrency to me because of the electrical circuit context, where the outputs of one are flowing into the next, but both are running concurrently. Processes that are Unix piped into each other would be another thing that feels more like a "series" than a "sequence".
The software terms parallel and sequential are about the temporal relationship of activities (things are done in parallel or sequentially). That’s why in software we also have the term “concurrent” which means something different from “parallel”.
Using the singular "Sequence" might also be appropriate for a component name, as the component represents the collection entity, rather than referring directly to the things within the collection itself (which I presume are either a prop or the children of the component).
< "ci": "CI=true bun run check && bun run test && bun run build && bun run docs && bun run zip && bun run zip:firefox"
> "ci": "CI=true bun run --parallel check test build docs && bun run --parallel zip zip:firefox"https://github.com/mysticatea/npm-run-all/blob/HEAD/docs/npm...
"scripts":{ "buldrun":"run-p check test docs && run-p zip zip:firefox" }
I guess you can put `bun run --parallel` into the script too but it's a bit more verbose.
I’m genuinely curious because there’s currently 63 open issues of reported segfaults.
https://github.com/oven-sh/bun/issues?q=is%3Aissue%20state%3...