PoC to explore reimplementing https://github.com/clojure-emacs/refactor-nrepl/blob/bc22338e9d92c33147a138fa8f83fb22d26d51f0/src/refactor_nrepl/find/find_locals.clj with trin
.
To achieve this find-locals
was reimplemented in thomasa.find-used-locals-trin-poc/find-used-locals
using trin
to retrieve an AST for the selected SEXPR. The machinery to find the selected SEXPR was also brought over from refactor-nrepl
and adapted to work with trin
AST.
The tests were also brought over from refactor-nrepl
to test this particular function to validate the PoC. trin
does a bit more than necessary to make these tests pass, those extra features are unit tested in the trin
project itself.
Find locals was picked because while discussing our problems with refactor-nrepl
(the lack of cljs/cljc support) due to the analyzer we use we figured that this feature was a good candidate to experiment with new analyzers.
See refactor-nrepl#195 for more context. And this commit for a PoC using cljs.analyzer
for cljs.
clojure -A:test -m kaocha.runner