I was only able to google up include_bytes! now registers the file included by tbelaire · Pull Request #24423 · rust-lang/rust · GitHub related to this idea. As I explain there, I'm looking for a way to log a file dependency from custom, user-written macros?
I'd like to write a macro that parses an xml spec and generates code on-the-fly (returning a TokenStream), but I'd want to be able to log this kind of dependency so that when the spec is edited, the rust file that includes it is recompiled. In the linked pull request, that was added for include_bytes! such that if the included file changes, the .rs that includes it gets recompiled. Is there a way to do that for my own macro?