Closed exupero closed 6 years ago
I think this is related to #52 and how the compiler finds/watches macro files. Since this is a little more complex, can you provide an example repo?
I solved #52 by supplying a top-level :source-paths
in my project.clj, but doo still doesn't pick up changes to .clj files. Here's an example project demonstrating the problem.
Thanks @exupero , I'll look at it shortly.
Hey @exupero
Macro reloading is not supported by the compiler's api. I think it is an important feature and doo should support it. Since we heavily rely on the compiler's api we will try to add it to the compiler. If that effort fails, we will refactor doo accordingly. In any case, it will take time :(
Sorry for the delay, I'll keep you posted.
Thanks for your work on this. I'm in no urgent need of a fix and can work around the problem until the right solution is found.
We got green light to fix this at the compiler level! Will update here any progress.
Note that I encounter this issue with .cljc
too,
will this fix the issue for both .clj
and .cljc
?
(thanks for this very handy tool btw)
Hi @lsenta, it seems that if I manage to solve it at the compiler level it should fix the problem for both cljc
and clj
files.
Awesome that you're working on this; Status updates?
I'm working on a bunch of cljs macros, and it's sooo painful...
Hi @metasoarous
We need to go to cljs.build.api/watch
and call something like this function when clj
and cljc
files need to be reloaded. I'll eventually get to it, but I don't know when since I've been super busy lately.
OK; Sounds good. Looking forward to it :-)
I'm not experiencing this issue (default config, no magic). I can touch a testing macro and suite will reload.
Issue might have become outdated?
I have several macros used by tests, and any time I change one of them, I have to stop the
lein doo
process and restart it, then (usually) touch my test file so doo recompiles the JS and runs the updated code. If I don't touch the test file, doo seems to use the original macro definition instead of the updated one.