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

0 votes
in ClojureScript by
There seems to be an error when the following happens:


(ns repro.a-namespace
  (:require [cljs.spec.alpha :as s] :reload-all))


There is a repro here: https://github.com/arichiardi/cljs-reload-all-repro

The stack is enormous so I attached a file but the gist of it is:


Caused by: clojure.lang.ExceptionInfo: No implementation of method: :read-char of protocol: #'clojure.tools.reader.reader-types/Reader found for class: clojure.tools.reader.reader_types.IndexingPushbackReader {:type :reader-exception}
    at clojure.core$ex_info.invokeStatic(core.clj:4739)
    at clojure.core$ex_info.invoke(core.clj:4739)
    at clojure.tools.reader$read_STAR_.invokeStatic(reader.clj:941)
    at clojure.tools.reader$read_STAR_.invoke(reader.clj:905)
    at clojure.tools.reader$read.invokeStatic(reader.clj:972)
    at clojure.tools.reader$read.invoke(reader.clj:949)
    at cljs.analyzer$forms_seq_STAR_$forms_seq___3119$fn__3120$fn__3121.invoke(analyzer.cljc:3676)
    at cljs.analyzer$forms_seq_STAR_$forms_seq___3119$fn__3120.invoke(analyzer.cljc:3669)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.RT.seq(RT.java:528)
    at clojure.core$seq__5124.invokeStatic(core.clj:137)
    at clojure.core$seq__5124.invoke(core.clj:137)
    at cljs.compiler$emit_source.invokeStatic(compiler.cljc:1389)
    at cljs.compiler$emit_source.invoke(compiler.cljc:1370)
    at cljs.compiler$compile_file_STAR_$fn__4580.invoke(compiler.cljc:1471)
    at cljs.compiler$with_core_cljs.invokeStatic(compiler.cljc:1285)
    at cljs.compiler$with_core_cljs.invoke(compiler.cljc:1274)
    at cljs.compiler$compile_file_STAR_.invokeStatic(compiler.cljc:1456)
    at cljs.compiler$compile_file_STAR_.invoke(compiler.cljc:1449)
    at cljs.compiler$compile_file$fn__4611.invoke(compiler.cljc:1553)
    ... 37 more

2 Answers

0 votes
by
_Comment made by: mfikes_

Minimal repro, with no links to projects:

Place the following in {{src/repro/a_namespace.cljs}}:


(ns repro.a-namespace
  (:require [cljs.spec.alpha :as s]))


and compile with


clojure -Sdeps '{:deps {org.clojurescript {:git/url "https://github.com/clojure/clojurescript" :sha "7c754fbb9ffb9da790f21776d53a3b83deef922b"}}}' -m cljs.main -O simple -t node -c repro.a-namespace


This will compile properly.

Then revise the source file to add {{:reload-all}} in the {{ns}} form:


(ns repro.a-namespace
  (:require [cljs.spec.alpha :as s] :reload-all))


and attempt the same compile:


$ clojure -Sdeps '{:deps {org.clojurescript {:git/url "https://github.com/clojure/clojurescript" :sha "7c754fbb9ffb9da790f21776d53a3b83deef922b"}}}' -m cljs.main -O simple -t node -c repro.a-namespace
Exception in thread "main" clojure.lang.ExceptionInfo: failed compiling file:/Users/mfikes/Desktop/src/repro/a_namespace.cljs {:file #object[java.io.File 0x2904bb45 "/Users/mfikes/Desktop/src/repro/a_namespace.cljs"]}
    at clojure.core$ex_info.invokeStatic(core.clj:4739)
    at clojure.core$ex_info.invoke(core.clj:4739)
    at cljs.compiler$compile_file$fn__4619.invoke(compiler.cljc:1567)
    at cljs.compiler$compile_file.invokeStatic(compiler.cljc:1528)
    at cljs.compiler$compile_file.invoke(compiler.cljc:1504)
    at cljs.closure$compile_file.invokeStatic(closure.clj:558)
    at cljs.closure$compile_file.invoke(closure.clj:549)
    at cljs.closure$eval6938$fn__6939.invoke(closure.clj:627)
    at cljs.closure$eval6874$fn__6875$G__6863__6882.invoke(closure.clj:511)
    at cljs.closure$compile_sources$iter__7062__7066$fn__7067.invoke(closure.clj:972)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.Cons.next(Cons.java:39)
    at clojure.lang.RT.next(RT.java:706)
    at clojure.core$next__5108.invokeStatic(core.clj:64)
    at clojure.core$dorun.invokeStatic(core.clj:3134)
    at clojure.core$doall.invokeStatic(core.clj:3140)
    at clojure.core$doall.invoke(core.clj:3140)
    at cljs.closure$compile_sources.invokeStatic(closure.clj:968)
    at cljs.closure$compile_sources.invoke(closure.clj:957)
    at cljs.closure$build.invokeStatic(closure.clj:2756)
    at cljs.closure$build.invoke(closure.clj:2662)
    at cljs.build.api$build.invokeStatic(api.clj:205)
    at cljs.build.api$build.invoke(api.clj:189)
    at cljs.build.api$build.invokeStatic(api.clj:192)
    at cljs.build.api$build.invoke(api.clj:189)
    at cljs.cli$default_compile.invokeStatic(cli.clj:299)
    at cljs.cli$default_compile.invoke(cli.clj:274)
    at cljs.cli$compile_opt.invokeStatic(cli.clj:305)
    at cljs.cli$compile_opt.invoke(cli.clj:303)
    at cljs.cli$main.invokeStatic(cli.clj:427)
    at cljs.cli$main.doInvoke(cli.clj:416)
    at clojure.lang.RestFn.applyTo(RestFn.java:139)
    at clojure.core$apply.invokeStatic(core.clj:659)
    at clojure.core$apply.invoke(core.clj:652)
    at cljs.main$_main.invokeStatic(main.clj:60)
    at cljs.main$_main.doInvoke(main.clj:52)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.lang.Var.applyTo(Var.java:702)
    at clojure.core$apply.invokeStatic(core.clj:657)
    at clojure.main$main_opt.invokeStatic(main.clj:317)
    at clojure.main$main_opt.invoke(main.clj:313)
    at clojure.main$main.invokeStatic(main.clj:424)
    at clojure.main$main.doInvoke(main.clj:387)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.lang.Var.applyTo(Var.java:702)
    at clojure.main.main(main.java:37)
Caused by: clojure.lang.ExceptionInfo: No implementation of method: :read-char of protocol: #'clojure.tools.reader.reader-types/Reader found for class: clojure.tools.reader.reader_types.IndexingPushbackReader {:type :reader-exception}
    at clojure.core$ex_info.invokeStatic(core.clj:4739)
    at clojure.core$ex_info.invoke(core.clj:4739)
    at clojure.tools.reader$read_STAR_.invokeStatic(reader.clj:941)
    at clojure.tools.reader$read_STAR_.invoke(reader.clj:905)
    at clojure.tools.reader$read.invokeStatic(reader.clj:972)
    at clojure.tools.reader$read.invoke(reader.clj:949)
    at cljs.analyzer$forms_seq_STAR_$forms_seq___3329$fn__3330$fn__3331.invoke(analyzer.cljc:3676)
    at cljs.analyzer$forms_seq_STAR_$forms_seq___3329$fn__3330.invoke(analyzer.cljc:3669)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.RT.seq(RT.java:528)
    at clojure.core$seq__5124.invokeStatic(core.clj:137)
    at clojure.core$seq__5124.invoke(core.clj:137)
    at cljs.compiler$emit_source.invokeStatic(compiler.cljc:1389)
    at cljs.compiler$emit_source.invoke(compiler.cljc:1370)
    at cljs.compiler$compile_file_STAR_$fn__4588.invoke(compiler.cljc:1471)
    at cljs.compiler$with_core_cljs.invokeStatic(compiler.cljc:1285)
    at cljs.compiler$with_core_cljs.invoke(compiler.cljc:1274)
    at cljs.compiler$compile_file_STAR_.invokeStatic(compiler.cljc:1456)
    at cljs.compiler$compile_file_STAR_.invoke(compiler.cljc:1449)
    at cljs.compiler$compile_file$fn__4619.invoke(compiler.cljc:1553)
    ... 44 more
Caused by: java.lang.IllegalArgumentException: No implementation of method: :read-char of protocol: #'clojure.tools.reader.reader-types/Reader found for class: clojure.tools.reader.reader_types.IndexingPushbackReader
    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$eval19106$fn__19118$G__19095__19123.invoke(reader_types.clj:24)
    at clojure.tools.reader$read_STAR_.invokeStatic(reader.clj:916)
    ... 62 more
0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2543 (reported by arichiardi)
...