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

0 votes
in ClojureScript by

I had .cljc files that worked fine in JVM Clojure, but in ClojureScript I was getting this error:

----  Could not Analyze  src/cljc/zm/ops1OP.cljc   line:1  column:1  ----            

  Don't know how to create ISeq from: clojure.lang.Keyword                           

  1  (ns zm.ops1OP
     ^--- Don't know how to create ISeq from: clojure.lang.Keyword                   
  2    "1OP operations"
  3    #?(:cljs (:require-macros (link: zm.util :refer [v4-5)]))                           
  4    (:require (link: zm.memory :refer :all)

----  Analysis Error : Please see src/cljc/zm/ops1OP.cljc  ---- 

The problem is the :refer :all, and the error message makes sense in hindsight, but CLJS could do much better at pointing out this mistake.

2 Answers

0 votes
by
_Comment made by: mfikes_

Here is how things currently look if you first load the core specs and then use the work from CLJS-2913:


cljs.user=> (require '[cljs.core.specs.alpha])
nil
cljs.user=> (require '[clojure.set :refer :all])
Syntax error macroexpanding cljs.core/require at (<cljs repl>:1:1).
:all - failed: coll? at: [:libspec :spec :lib+opts :options :refer] spec: :cljs.core.specs.alpha/refer
[clojure.set :refer :all] - failed: simple-symbol? at: [:libspec :spec :lib :sym] spec: :cljs.core.specs.alpha/lib
[clojure.set :refer :all] - failed: string? at: [:libspec :spec :lib :str] spec: :cljs.core.specs.alpha/lib
(quote [clojure.set :refer :all]) - failed: #{:verbose :reload :reload-all} at: [:flag]
cljs.user=>
0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2972 (reported by alex+import)
...