Yesterday, I followed the excellent "Clojurescript Quick Start Guide" 
(https://clojurescript.org/guides/quick-start). Everything worked as 
expected. They did a great job of making it as minimal as possible.

After that, I followed the "Emacs and Inferior Clojure Interaction Mode" 
guide (https://clojurescript.org/tools/emacs-inf). That's a nice guide, 
too. I had one issue: the instructions are out of date because inf-clojure 
removed the run-clojure alias for the inf-clojure function. I submitted a 
patch: https://github.com/clojure/clojurescript-site/pull/246

Currently, I'm running with Emacs, inf-clojure, and lein-cljsbuild. It 
seems to be working well. I don't have live code reloading, like Figwheel.

This is the function I'm using in my .emacs to launch the repl: 

(defun cljs-browser-repl ()
  (interactive)
  (inf-clojure "lein trampoline run -m clojure.main repl.clj"))

And the contents of repl.clj:

(require '[cljs.repl :as repl])
(require '[cljs.repl.browser :as browser])  ;; require the browser 
implementation of IJavaScriptEnv
(def env (browser/repl-env :static-dir ["." "out/" "resources/public/"])) 
;; create a new environment
(repl/repl env) ;; start the REPL

Today, for unknown reasons, I'm no longer getting the "def: 
(:arglists^[[0m..." messages in my minibuffer, but instead I'm seeing two 
different errors when I put the cursor in an expression:

WARNING: Use of undeclared Var cljs.user/Throwable at line 6 <cljs repl>
clojure.lang.ExceptionInfo: Assert failed: Argument to resolve must be a 
quoted symbol
(core/and (seq? quoted-sym) (= (quote quote) (first quoted-sym))) at line 4 
<cljs repl> {:file "<cljs repl>", :line 4, :column 2, :root-source-info 
{:source-type :fragment, :source-form (try (:arglists (clojure.core/meta 
(clojure.core/resolve (clojure.core/read-string "ClojureScript")))) (catch 
Throwable t nil))}, :tag :cljs/analysis-error}

This usually pops up in the minibuffer as: defn: (core/and (seq? 
quoted-sym)), but fortunately the full message went to the REPL once. Note 
that this is the same error I was when using Monroe instead of inf-clojure.

The other message I see is: 

ReferenceError: planck is not defined
(<NO_SOURCE_FILE>)

which pops up in the minibuffer as: defn: (<NO_SOURCE_FILE>)

I also got this error once when trying to get the docstring for a var:

WARNING: No such namespace: lumo.repl, could not locate lumo/repl.cljs, 
lumo/repl.cljc, or JavaScript source providing "lumo.repl" at line 1 <cljs 
repl>
WARNING: Use of undeclared Var lumo.repl/doc at line 1 <cljs repl>
WARNING: Can't take value of macro cljs.core/declare at line 1 <cljs repl>
ReferenceError: lumo is not defined
(<NO_SOURCE_FILE>)

To my knowledge, I'm not using lumo or planck.

Andrea, do you still think these are issues with inf-clojure?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to