jakemcc / test-refresh

Refreshes and reruns clojure.tests in your project.
393 stars 28 forks source link

Sometimes could is not reloaded #32

Closed donbonifacio closed 9 years ago

donbonifacio commented 9 years ago

Hello,

Sometimes we experience code not being reloaded. For example, we add a println somewhere and save. The console updates, showing that it detected the change, but no output is present. If we restart lein-test-refresh, the println shows up.

This also meas that we might have come testes failing but lein-test-refresh don't report it, forcing us to restart the process several times.

I can't replicate this. Is this a know issue? Is there a workaround? Can I provide some more info?

Thanks

jakemcc commented 9 years ago

Hmm. That is unfortunate. I haven't noticed this happening and it hasn't been reported before. Have you noticed if it happens in a specific part of your code base? Do you have any more details? Able to share any code?

lein-test-refresh uses tools.namespace under the covers to do the code reloading. If you look at tools.namespace's readme there are some situations where it can't reload code. Do any of the warnings there sound like they might be affecting you?

I just released version 0.8.0 of lein-test-refresh earlier this week. It updates the tools.namespace dependency. If you aren't on the latest version could you try updating?

I have seen problems with code reloading when the ns forms of files don't match what the ns docstring shows. You might double check that your ns forms are using the keywords (:require instead of require). I've run into that before where a mis-type causes the : to get dropped and then the code still works but reloading breaks.

donbonifacio commented 9 years ago

Updated to 0.8.0 and for the past two days, no sync problems. :)

jakemcc commented 9 years ago

Great to hear!