figwheel

general discussion about figwheel, specific discussions in #figwheel-main and #lein-figwheel
kiemdoder 2018-09-11T06:11:04.000100Z

I have Rebel readline in my deps.edn but when I run "clojure -m figwheel.main" I don't see evidence of Rebel on my console.

kiemdoder 2018-09-11T06:25:12.000100Z

{:deps {com.bhauman/figwheel-main {:mvn/version "0.1.9"}} com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}}

2018-09-11T08:07:38.000100Z

Hey folks sorry if this has been already asked but is anyone having this problem:

java.lang.IllegalArgumentException: No implementation of method: :read-char of protocol: #'clojure.tools.reader.reader-types/Reader found for class: java.io.StringReader
        at clojure.core$_cache_protocol_fn.invokeStatic(core_deftype.clj:583)
        at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:575)
        at clojure.tools.reader.reader_types$fn__20788$G__20770__20793.invoke(reader_types.clj:25)
        at clojure.tools.reader.reader_types.SourceLoggingPushbackReader.read_char(reader_types.clj:204)
        at rebel_readline.cljs.repl$has_remaining_QMARK_.invokeStatic(repl.clj:19)
        at rebel_readline.cljs.repl$has_remaining_QMARK_.invoke(repl.clj:13)
        at rebel_readline.core$create_buffered_repl_reader_fn$fn__41546$fn__41547.invoke(core.clj:173)
        at cljs.repl$repl_STAR_$read_eval_print__15678$fn__15679.invoke(repl.cljc:847)
        at cljs.repl$repl_STAR_$read_eval_print__15678.invoke(repl.cljc:840)
        at cljs.repl$repl_STAR_$fn__15684$fn__15693.invoke(repl.cljc:896)
        at cljs.repl$repl_STAR_$fn__15684.invoke(repl.cljc:895)
        at cljs.compiler$with_core_cljs.invokeStatic(compiler.cljc:1178)
        at cljs.compiler$with_core_cljs.invoke(compiler.cljc:1167)
        at cljs.repl$repl_STAR_.invokeStatic(repl.cljc:857)
        at cljs.repl$repl_STAR_.invoke(repl.cljc:733)
        at rebel_readline.cljs.repl$eval46361$repl_STAR___46362.invoke(repl.clj:74)

2018-09-11T08:07:56.000100Z

my figwheel repl is spitting out an endless stream of that stack trace

2018-09-11T08:08:01.000200Z

though it seems to work.

2018-09-11T08:08:22.000100Z

I've tried deleting all my code and most the obvious CLJS packages from my project.clj and it still is happening...

2018-09-11T08:12:08.000100Z

^ seems like an old clojurescript version was the culprit

2018-09-11T08:12:34.000100Z

Did a double take on the project.clj and saw I was on clojure 1.8 and cljs 1.9.521

bhauman 2018-09-11T11:15:55.000100Z

@djtango clojure 1.9 is required

bhauman 2018-09-11T11:19:41.000100Z

@kiemdoder that is very strange

bhauman 2018-09-11T11:20:24.000100Z

reminder that #figwheel-main is the best channel for figwheel.main related discussion

kiemdoder 2018-09-11T11:23:03.000100Z

@bhauman I created a Leiningen project with https://rigsomelight.com/figwheel-main-template/ in the mean time and Rebel works fine there when I start Figwheel with lein fig:build.

bhauman 2018-09-11T11:23:47.000100Z

are you on windows?

kiemdoder 2018-09-11T11:23:53.000100Z

mac

bhauman 2018-09-11T11:24:41.000100Z

hmmm well figwheel.main requires rebel-readline dynamicly and uses it if its there

bhauman 2018-09-11T11:25:02.000100Z

so it sounds like something missfired

bhauman 2018-09-11T11:25:25.000100Z

like if you start clj with that deps.edn

kiemdoder 2018-09-11T11:26:03.000100Z

I followed the Figwheel tutorial

bhauman 2018-09-11T11:26:04.000100Z

you should be able to require ’rebel-readline-cljs.main

bhauman 2018-09-11T11:26:41.000100Z

its sounds like you did things right

kiemdoder 2018-09-11T11:26:48.000100Z

let me have a look

kiemdoder 2018-09-11T11:31:14.000100Z

I created a new dir, copied the deps.edn file and now it works. I can see "[Rebel readline] Type :repl/help for online help info"

kiemdoder 2018-09-11T11:33:32.000100Z

maybe creating the Leiningen project with the template fixed something

bhauman 2018-09-11T12:14:05.000100Z

@kiemdoder there is a .cpcache dir that caches the classpath maybe that got out of sync somehow