figwheel

general discussion about figwheel, specific discussions in #figwheel-main and #lein-figwheel
Andrea Imparato 2019-08-05T16:37:44.033300Z

hi everyone, I'm having issues in importing friends to my figwheel app. When I try to put friends in my project.clj file I get:

Caused by: clojure.lang.ExceptionInfo: Call to clojure.core/ns did not conform to spec. {:clojure.spec.alpha/problems [{:path [], :reason "Extra input", :pred (clojure.spec.alpha/cat :attr-map (clojure.spec.alpha/? clojure.core/map?) :ns-clauses :clojure.core.specs.alpha/ns-clauses), :val ((require [ring.util.codec :as codec] [ring.util.response :as response] [ring.util.request :as request] [ring.middleware.head :as head])), :via [:clojure.core.specs.alpha/ns-form], :in [2]}], :clojure.spec.alpha/spec #object[clojure.spec.alpha$regex_spec_impl$reify__2509 0x40738846 "clojure.spec.alpha$regex_spec_impl$reify__2509@40738846"], :clojure.spec.alpha/value (ring.middleware.resource "Middleware for serving static resources." (require [ring.util.codec :as codec] [ring.util.response :as response] [ring.util.request :as request] [ring.middleware.head :as head])), :clojure.spec.alpha/args (ring.middleware.resource "Middleware for serving static resources." (require [ring.util.codec :as codec] [ring.util.response :as response] [ring.util.request :as request] [ring.middleware.head :as head]))}

Andrea Imparato 2019-08-05T16:38:19.033600Z

this is my project.clj file:

(defproject clj-40k-tournaments "0.1.0-SNAPSHOT"
  :description "FIXME: write this!"
  :url "<http://example.com/FIXME>"
  :license {:name "Eclipse Public License"
            :url "<http://www.eclipse.org/legal/epl-v10.html>"}

  :min-lein-version "2.7.1"

  :dependencies [[org.clojure/clojure "1.10.0"]
                 [org.clojure/clojurescript "1.10.520"]
                 [com.cemerick/friend "0.2.3"]
                 [reagent "0.8.1"]
                 ]

  :source-paths ["src"]

  :aliases {"fig"       ["trampoline" "run" "-m" "figwheel.main"]
            "fig:build" ["trampoline" "run" "-m" "figwheel.main" "-b" "dev" "-r"]
            "fig:min"   ["run" "-m" "figwheel.main" "-O" "advanced" "-bo" "dev"]
            "fig:test"  ["run" "-m" "figwheel.main" "-co" "test.cljs.edn" "-m" clj-40k-tournaments.test-runner]}

  :profiles {:dev {:dependencies [[com.bhauman/figwheel-main "0.2.3"]
                                  [com.bhauman/rebel-readline-cljs "0.1.4"]]
                   }})

Andrea Imparato 2019-08-05T16:41:01.034200Z

anybody here is using friends and figwheel together?

Andrea Imparato 2019-08-05T17:43:59.034700Z

ok it seems it's lein the problem somehow... If I run clojure -A:fig:build everything works fine