Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

Some existing Clojure tooling (link: 1) currently built on top of tools.analyzer.jvm, depend on having end-line and end-column on an AST node.

This data is currently missing from the ClojureScript analyzer, which prevents these tools from being ported to ClojureScript (link: 2)

(link: 1) https://github.com/clojure-emacs/refactor-nrepl
(link: 2) https://github.com/clojure-emacs/refactor-nrepl/issues/195#issuecomment-303910871

9 Answers

0 votes
by

Comment made by: julienfantin

Here is a patch that adds end-line and end-column and tries to standardize how that data is obtained from the env.

0 votes
by

Comment made by: anmonteiro

I think this is already being tackled in CLJS-1461, which goal is to achieve full compatibility with the tools.analyzer AST.

0 votes
by

Comment made by: dnolen

CLJS-1461 is a big project and we're not sure how long it will take. In the meantime I don't see a problem with incremental steps in that direction if we get the patches.

0 votes
by

Comment made by: dnolen

This patch looks fine but it would be nice to get some feedback that in fact source mapping is not affected.

0 votes
by

Comment made by: julienfantin

Unfortunately our main project depends on an older ClojureScript version so I couldn't test this on our main codebase. Are there specific things you'd watch out for?

0 votes
by

Comment made by: dnolen

Julien, no need for you to test this, trying to get some outside help here :)

0 votes
by

Comment made by: benedek.fazekas

any progress on this? just realised this is pending while looking at https://github.com/clojure-emacs/refactor-nrepl/issues/195
thanks

0 votes
by

Comment made by: dnolen

We just need more feedback on this thread. Try the patch and let us know whether source mapping still works.

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2051 (reported by julienfantin)
...