You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inotify to get fs events, and trigger targets based on that
moonbuild -w [target] should get all targets that target depends on, find the smallest subset of directories that matches them, watch them and retrigger a build of target when any file changes. since moonbuild only rebuilds what actually changed, this should be both efficient and complete. This will not work if there's new files or dependancies, but this can be fixed by also watching Build.moon and reexecuting it every time any file changes
probably steal some code from alfons for the specifics of how to use inotify
The text was updated successfully, but these errors were encountered:
can probably use the inotifyd or busybox inotifyd command as a kind of daemon through luaposix if inotify isn't installed; maybe even an inline nodejs script using fs.watch if available
wRMymnd seems like a decent mask for inotifyd, and it can also just write to stdout.
Will require a popen implementation for _cmd that supports killing the spawned process, which is nontrivial for the posix backend and complicated for the lua backend.
Plain inotify module seems easier to deal with if it's available.
Inlining a nodejs script is probably even worse so let's say I won't do this.
sleep-based approaches could actually work, but not with fs cache enabled.
Anything that touches inotify will probably need to re-run the buildfile and regenerate the depgraph if any file is created/deleted.
inotify
to get fs events, and trigger targets based on thatmoonbuild -w [target]
should get all targets thattarget
depends on, find the smallest subset of directories that matches them, watch them and retrigger a build oftarget
when any file changes. sincemoonbuild
only rebuilds what actually changed, this should be both efficient and complete. This will not work if there's new files or dependancies, but this can be fixed by also watchingBuild.moon
and reexecuting it every time any file changesprobably steal some code from alfons for the specifics of how to use
inotify
The text was updated successfully, but these errors were encountered: