Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebel-clj is fine but rebel-cljs won't start #185

Open
tabidots opened this issue Mar 1, 2019 · 2 comments
Open

Rebel-clj is fine but rebel-cljs won't start #185

tabidots opened this issue Mar 1, 2019 · 2 comments

Comments

@tabidots
Copy link

tabidots commented Mar 1, 2019

I added the rebel-clj bit to my .zshrc file some time ago and never had any problems.

Recently (after upgrading to the latest Clojure) I added the rebel-cljs part but can't seem to get it started. After downloading all the dependencies for it, this is what came up:

Exception in thread "main" Syntax error macroexpanding clojure.core/ns at (figwheel/main.cljc:1:1).
Call to clojure.core/ns did not conform to spec.
	at clojure.lang.Compiler.checkSpecs(Compiler.java:6971)
	at clojure.lang.Compiler.macroexpand1(Compiler.java:6987)
	at clojure.lang.Compiler.macroexpand(Compiler.java:7074)
	at clojure.lang.Compiler.eval(Compiler.java:7160)
	at clojure.lang.Compiler.load(Compiler.java:7635)
	at clojure.lang.RT.loadResourceScript(RT.java:381)
	at clojure.lang.RT.loadResourceScript(RT.java:372)
	at clojure.lang.RT.load(RT.java:463)
	at clojure.lang.RT.load(RT.java:428)
	at clojure.core$load$fn__6824.invoke(core.clj:6126)
	at clojure.core$load.invokeStatic(core.clj:6125)
	at clojure.core$load.doInvoke(core.clj:6109)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5908)
	at clojure.core$load_one.invoke(core.clj:5903)
	at clojure.core$load_lib$fn__6765.invoke(core.clj:5948)
	at clojure.core$load_lib.invokeStatic(core.clj:5947)
	at clojure.core$load_lib.doInvoke(core.clj:5928)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$load_libs.invokeStatic(core.clj:5985)
	at clojure.core$load_libs.doInvoke(core.clj:5969)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$require.invokeStatic(core.clj:6007)
	at clojure.main$main_opt.invokeStatic(main.clj:491)
	at clojure.main$main_opt.invoke(main.clj:487)
	at clojure.main$main.invokeStatic(main.clj:598)
	at clojure.main$main.doInvoke(main.clj:561)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.main.main(main.java:37)
Caused by: clojure.lang.ExceptionInfo: Call to clojure.core/ns did not conform to spec. {:clojure.spec.alpha/problems ({:path [:ns-clauses :refer-clojure :clause], :pred #{:refer-clojure}, :val :import, :via [:clojure.core.specs.alpha/ns-form :clojure.core.specs.alpha/ns-refer-clojure :clojure.core.specs.alpha/ns-refer-clojure], :in [2 0]} {:path [:ns-clauses :require :clause], :pred #{:require}, :val :import, :via [:clojure.core.specs.alpha/ns-form :clojure.core.specs.alpha/ns-require :clojure.core.specs.alpha/ns-require], :in [2 0]} {:path [:ns-clauses :import :classes :class], :pred clojure.core/simple-symbol?, :val [java.net.InetAddress], :via [:clojure.core.specs.alpha/ns-form :clojure.core.specs.alpha/ns-import :clojure.core.specs.alpha/ns-import], :in [2 2]} {:path [:ns-clauses :import :classes :package-list :classes], :reason "Insufficient input", :pred clojure.core/simple-symbol?, :val (), :via [:clojure.core.specs.alpha/ns-form :clojure.core.specs.alpha/ns-import :clojure.core.specs.alpha/ns-import :clojure.core.specs.alpha/package-list :clojure.core.specs.alpha/package-list], :in [2 2]} {:path [:ns-clauses :use :clause], :pred #{:use}, :val :import, :via [:clojure.core.specs.alpha/ns-form :clojure.core.specs.alpha/ns-use :clojure.core.specs.alpha/ns-use], :in [2 0]} {:path [:ns-clauses :refer :clause], :pred #{:refer}, :val :import, :via [:clojure.core.specs.alpha/ns-form :clojure.core.specs.alpha/ns-refer :clojure.core.specs.alpha/ns-refer], :in [2 0]} {:path [:ns-clauses :load :clause], :pred #{:load}, :val :import, :via [:clojure.core.specs.alpha/ns-form :clojure.core.specs.alpha/ns-load :clojure.core.specs.alpha/ns-load], :in [2 0]} {:path [:ns-clauses :gen-class :clause], :pred #{:gen-class}, :val :import, :via [:clojure.core.specs.alpha/ns-form :clojure.core.specs.alpha/ns-gen-class :clojure.core.specs.alpha/ns-gen-class], :in [2 0]}), :clojure.spec.alpha/spec #object[clojure.spec.alpha$regex_spec_impl$reify__2509 0x74f5ce22 "clojure.spec.alpha$regex_spec_impl$reify__2509@74f5ce22"], :clojure.spec.alpha/value (figwheel.main (:require [cljs.analyzer :as ana] [cljs.analyzer.api :as ana-api] [cljs.build.api :as bapi] [cljs.cli :as cli] [cljs.env] [cljs.main :as cm] [cljs.repl] [cljs.repl.figwheel] [cljs.util] [clojure.java.io :as io] [clojure.pprint :refer [pprint]] [clojure.string :as string] [clojure.edn :as edn] [clojure.tools.reader.edn :as redn] [clojure.tools.reader.reader-types :as rtypes] [figwheel.core :as fw-core] [figwheel.main.ansi-party :as ansip] [figwheel.main.logging :as log] [figwheel.main.util :as fw-util] [figwheel.main.watching :as fww] [figwheel.main.helper :as helper] [figwheel.repl :as fw-repl] [figwheel.tools.exceptions :as fig-ex]) (:import [java.io StringReader] [java.net.InetAddress] [java.net.URI] [java.net.URLEncoder] [java.nio.file.Paths])), :clojure.spec.alpha/args (figwheel.main (:require [cljs.analyzer :as ana] [cljs.analyzer.api :as ana-api] [cljs.build.api :as bapi] [cljs.cli :as cli] [cljs.env] [cljs.main :as cm] [cljs.repl] [cljs.repl.figwheel] [cljs.util] [clojure.java.io :as io] [clojure.pprint :refer [pprint]] [clojure.string :as string] [clojure.edn :as edn] [clojure.tools.reader.edn :as redn] [clojure.tools.reader.reader-types :as rtypes] [figwheel.core :as fw-core] [figwheel.main.ansi-party :as ansip] [figwheel.main.logging :as log] [figwheel.main.util :as fw-util] [figwheel.main.watching :as fww] [figwheel.main.helper :as helper] [figwheel.repl :as fw-repl] [figwheel.tools.exceptions :as fig-ex]) (:import [java.io StringReader] [java.net.InetAddress] [java.net.URI] [java.net.URLEncoder] [java.nio.file.Paths]))}
	at clojure.spec.alpha$macroexpand_check.invokeStatic(alpha.clj:705)
	at clojure.spec.alpha$macroexpand_check.invoke(alpha.clj:697)
	at clojure.lang.AFn.applyToHelper(AFn.java:156)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.lang.Compiler.checkSpecs(Compiler.java:6969)
	... 31 more

Any idea what went wrong? I am totally new to ClojureScript and Figwheel so I'm lost at sea here.

@bhauman
Copy link
Owner

bhauman commented Mar 1, 2019

You probably just need to update your version of figwheel.main. The new Clojure became stricter about namespace forms.

When you say rebel-clj and rebel-cljs I'm not sure what you are referring to.

@tabidots
Copy link
Author

tabidots commented Mar 2, 2019

Ah, sorry! I got the names mixed up. This is what I was referring to.

So I tried to change the figwheel-main part of that snippet to

{com.bhauman/figwheel-main {:mvn/version \"0.2.1\"}

and now when I run rebel-cljs in the terminal I get:

Downloading: com/google/javascript/closure-compiler-externs/v20170910/closure-compiler-externs-v20170910.pom from https://repo1.maven.org/maven2/
Error building classpath. Could not find artifact com.bhauman:figwheel-main:jar:0.2.1 in central (https://repo1.maven.org/maven2/)

0.2.1 is the newest version, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants