Support tracking non-clojure files when performing a refresh. The idea here is to make the reloaded workflow work well for libraries like HugSQL (which may depend on non-clojure files in the project).
See https://github.com/layerware/hugsql/issues/72 for some additional context
I have been aware of the value of this feature for a long time now, but I expect it would require significant, breaking changes to the internal data structures used by tools.namespace.
I've been thinking about the internal data structures for a bit, I think it may be possible to track this without breaking the internal data structures. The insight is that we need to determine `modified` clojure source files by taking the max modified timestamp of the clojure src file and any of it's external dependencies.
This would require three changes:
1. a way of defining external file dependencies (perhaps as metadata on the namespaces). Example:
2. a new entry in tracker named ::files/filedeps that maps source files -> other files.
3. update the `modified-files` predicate to take in `file-deps`, roughly like so:
I took a stab at implementing this, would love your thoughts. The docs do need a bit of work to explain how this works though.
I'm trying this out now and it seems to do just what I want. The only thing I'm noticing is that there is no indication that a filedep has changed in the `:reloading` message, it only shows the namespaces. Not sure how/if you want to show that though.