Closed barrosfelipe closed 5 years ago
This functionality isn't supported in clojurescript. We have to build an AST to find the unbound variables (which will be the parameters of the new function). Since we're unable to build an AST for Clojurescript, and get those variables, we end up pushing nil
further down the stack where it eventually blows up.
I'll close this issue here, because it's really the middleware's job to either signal that it can't handle this request or to gain some better cljs support.
Thanks for the report, and sorry about the crappy failure mode!
Expected behavior
Given:
Inside
foo
sexp, invokecljr-create-fn-from-example
. Expected:Actual behavior
Get error
cljr--guess-param-name: Wrong type argument: char-or-string-p, nil
.Steps to reproduce the problem
I have used the figwheel-main template via clj-new.
clj -A:new figwheel-main namespace/project
Enter the ClojureScript file and jack-in passing the
-R:fig
flag tocider-jack-in-cljs
.Choose
figwheel-main
and profiledev
without colon.On the ClojureScript file, try the above.
Environment & Version information
clj-refactor.el version information
clj-refactor 2.5.0-SNAPSHOT (package: 20190618.716), refactor-nrepl 2.5.0-SNAPSHOT
CIDER version information
Leiningen or Boot version
Emacs version
GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-07-24
Operating system
Ubuntu Linux 18.04