replete-repl / replete-ios

ClojureScript REPL iOS app
Eclipse Public License 1.0
395 stars 25 forks source link

analyzer warnings #21

Closed mfikes closed 9 years ago

mfikes commented 9 years ago

If you evaluate an undefined var, say x, you will get nil. Perhaps the analyzer is emitting warnings that Replete is not showing?

kanaka commented 9 years ago

Yeah, same problem in plain bootstrapped REPL. I just pushed a fix:

--- a/src/cljs_bootstrap/repl.cljs
+++ b/src/cljs_bootstrap/repl.cljs
@@ -76,7 +76,7 @@
             (try
               (let [form (r/read-string line)
                     _ (when DEBUG (prn "form:" form))
-                    ast (no-warn (ana/analyze env form))
+                    ast (ana/analyze env form)
                     _ (when DEBUG (prn "ast:" ast))
                     js (with-out-str
                          (ensure

I had copied the no-warn from an earlier @swannodette example.

swannodette commented 9 years ago

ClojureScript will need to split printing from error printing for this problem to be solved.

mfikes commented 9 years ago

analyzer @swannodette FWIW, @kanaka 's solution works in Replete ^