45 points · by signa11 · 2y ago · 11 comments
also, earlier:
Build systems à la carte: theory and practice (revised and expanded) [pdf] - https://news.ycombinator.com/item?id=25113759 - Nov 2020 (3 comments)
This paper guided the design. It's one of my favorites, and I read it once a year.
Once it is, these will be possible. And I did misspeak: filesystem watching is not easily done by dynamic dependencies, but it will be easy for Rig.
Speaking as though Rig is full-featured, tracing command dependencies can easily be implemented by users (by adding strace on commands), and then the data from those traces can be stored in the build database. Then dynamic dependencies can be used to make those as dependencies on subsequent builds.
For filesystem watchers, Rig has the capability of having different build types. One of the functions of a build type is how to check a file for modification.
As of right now, it just returns true. Once incremental builds are added, files will be checked for modification in that build type's function.
To add support for filesystem watchers, I simply add a build type that checks the watcher for modifications in that function.