juxt / mach

A remake of make (in ClojureScript)
246 stars 21 forks source link

Feature request: Streaming Stdout/Stderr #18

Closed SevereOverfl0w closed 7 years ago

SevereOverfl0w commented 7 years ago

Stream realtime stdout/stderr instead of waiting until command completion. Makes long-running tasks very opaque.

Example:

;; Machfile.edn
{foo #$ ["./test-this"]}
# test-this
#!/usr/bin/env sh

echo "Line 1"
sleep 10
echo "Line 2"

Prints nothing for 10s, instead of Line1 instantly, followed by Line2 in 10s.

SevereOverfl0w commented 7 years ago

Digging in, this appears to require a rewrite of parts of mach to be async. Promises probably fulfill our needs, perhaps using promesa or similar as cljs doesn't have native promises.