Fork me on GitHub

Is it possible to get mount to recognise changes in HugSQL files? E.g. if I edit my-cool-query in queries.sql and call (reset) in my REPL, my app still references the old cached my-cool-query since my.db is using conman/bind-connection to inject vars, and my.db hasn't fundamentally changed (hence mount doesn't recognise it as having changed).


Hmm.. so I can get the desired result by calling (refresh-all) rather than (reset), however that's not ideal as it reloads all my namespaces. Would be great if I could just get conman / mount to recognise that my .sql file has changed and just reload the my.db namespace


there isn't a simple way to do that, the query functions need to be available at compile time, so they can't be managed by mount


meanwhile, I don't think it makes sense for conman to do file watching in bind queries


my approach has been to simply rerun bind-queries in the repl after changing the sql files


thanks @yogthos - that makes sense