One may now run amc compile test.ml --watch -o out.lua, and it will recompile whenever test.ml, or any of its dependencies change. File watchers on dependencies are automatically registered/unregistered.
Note, there's currently a few places where there is room for improvement:
This currently has no additional debouncing (beyond what is done within fsnotify). I did think about adding some, but found I didn't really need any quite yet.
Related to that, this will run compilation to completion. Ideally we would cancel compilation if files changed during it, and restart (while still keeping as much progress as possible).
Most time is currently spent in the optimiser. It'd be nice to have per-module optimisations, but there's a lot of plumbing needed to get to that stage.
One may now run
amc compile test.ml --watch -o out.lua
, and it will recompile whenevertest.ml
, or any of its dependencies change. File watchers on dependencies are automatically registered/unregistered.Note, there's currently a few places where there is room for improvement:
This currently has no additional debouncing (beyond what is done within fsnotify). I did think about adding some, but found I didn't really need any quite yet.
Related to that, this will run compilation to completion. Ideally we would cancel compilation if files changed during it, and restart (while still keeping as much progress as possible).
Most time is currently spent in the optimiser. It'd be nice to have per-module optimisations, but there's a lot of plumbing needed to get to that stage.