Fork me on GitHub
#luminus
<
2017-01-03
>
dhruv09:01:10

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).

dhruv10:01:45

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

yogthos22:01:18

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

yogthos22:01:01

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

yogthos22:01:26

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

dhruv23:01:50

thanks @yogthos - that makes sense