Run/start rules in Shake

15 views
Skip to first unread message

Luke Hoersten

unread,
Apr 12, 2015, 3:50:37 PM4/12/15
to shake-bui...@googlegroups.com
I've been debating whether I should write a run/start rule for my project in my Shakefile. I have maybe 3 or 4 processes that need to be started and it would be nice to "need" the binaries as dependencies before running. The problem is the "cmd" function blocks and probably isn't the right tool for starting an async process. What is everyone's thoughts on this situation? Should I just use something like Turtle or Shelly and skip the Shake integration for running?

Thanks,
Luke

Neil Mitchell

unread,
Apr 13, 2015, 9:54:34 AM4/13/15
to Luke Hoersten, shake-bui...@googlegroups.com
Hi Luke,

I've done exactly that before, using the functions directly out of
System.Process. Using Shelly/Turtle would work just as well. There's
no real need to skip the Shake integration, just do:

need ["thebinary"]
liftIO $ myFavouriteCommandRunningTool "thebinary"

I think it's reasonable for cmd to have a non-blocking mode, so I've
raised that as a ticket:
https://github.com/ndmitchell/shake/issues/228

Thanks, Neil
Reply all
Reply to author
Forward
0 new messages