hmm
figwheel doesn't seem to like the macro I've used to set up devtools
(e.g. using environ to determine that I'm in dev and that devtools should be set up)
I’m sorry, I don’t remember the context
will elaborate in a sec
so I have this:
(defmacro require-devtools! []
(when (:devtools env)
;; TODO: Replace this with a ClojureScript require function
'(js/goog.require "frontend.devtools")))
and this:
(ns frontend.devtools
(:require [devtools.core :as devtools]))
; this enables additional features, :custom-formatters is enabled by default
(defn setup! []
(devtools/enable-feature! :sanity-hints :dirac)
(devtools/install!))
(setup!)
and my devtools profile looks like this:
{:repl-options {:port 8230
:nrepl-middleware [dirac.nrepl.middleware/dirac-repl]
:init (do
(require 'dirac.agent)
(dirac.agent/boot!))}
:env {:devtools "true"}
:cljsbuild {:builds {:dev {:source-paths ["devtools"]}}}
:dependencies [[binaryage/devtools "0.5.2"]
[binaryage/dirac "0.1.3"]]}
running lein with-profile +devtools figwheel
doesn't seem to work, while lein with-profile +devtools cljsbuild once
did
ah, I think this is a known issue of figwheel, it does not understand profiles in project.clj
figwheel simply reads project.clj using read-string and does not perform profile merging
AFAIK
just did a quick google search:
"An important note about configuration: The (start-figwheel!) call will automatically pull your configuration from the project.clj BUT ... no leiningen profile merging will occur (this is because we are reading the config raw from the project.clj file)."
@frank: but maybe I’m wrong, I just looked at my other projects and I successfully use figwheel with profiles there
even cljs-devtools-sample uses it: https://github.com/binaryage/cljs-devtools-sample/blob/master/project.clj
so your problem will be likely elsewhere, can you share full project.clj?
@darwin: https://github.com/circleci/frontend/blob/master/project.clj
looks good to me
perhaps this is an issue with environ instead of lein profiles
since it looks like other aspects of the lein profile are being respected in figwheel