Fork me on GitHub
#kaocha
<
2023-08-27
>
simonkatz18:08:18

Hi. I think I’ve found a problem with Kaocha’s watch functionality not respecting :lambdaisland.tools.namespace.repl/load and lambdaisland.tools.namespace.repl/unload metadata on namespaces — it unloads/loads namespaces regardless. I’ve hacked a fix for this by adding a call of lambdaisland.tools.namespace.repl/remove-disabled on the tracker in kaocha.watch/plugin. It seems to work for me, and the tests pass, but I don’t think I’m familiar enough with the repo to submit a PR — for example I don’t know whether my change is the right way to do things or whether tests should be added. Also, lambdaisland.tools.namespace.repl/remove-disabled is private, so that would probably need to be made public. (See https://github.com/simon-katz/kaocha-with-nomis-hacks/commit/ca1602984338e779eb3db1e2f3e4bf9014b638e0?w=1 for my change.) A couple of related points: • No reloading happens if any paths in the watch-paths function don’t exist. I’ve hacked a fix for this at https://github.com/simon-katz/kaocha-with-nomis-hacks/commit/69963e7ecb26b0137637db4e6ea698013998229a • I wonder whether lambdaisland’s tools.namespace should respect clojure.tools.namespace.repl load/unload metadata. For a POC which works for my limited use case at least, see https://github.com/simon-katz/tools.namespace/commit/0df94efeec606ee1d97d1bbe63542842d9a28cab I’m happy to create issues in GitHub if it’s agreed these are issues.