You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With projects having both, clojure+cljs in their project structure, there is no single classpath that is appropriate. I then, do not set a :source-paths at all in my profile.clj but only ever set them in my leiningen profiles. The composite profiles makes this very nice and modular and composable.
I also use the profiles to obtain different compilation for cljs projects (debug/production).
The problem is when I want to have a figwheel REPL in Cursive (with the scripts/figwheel-cljs-repl.clj method) then the classpaths are not set properly.
I'd like to see a lein run method in Cursive to start a REPL (Or even more general: Allow any process to start). There I can apply my options and start my figwheel REPL properly:
lein with-profile +dev-cljs run -m clojure.main scripts/figwheel-cljs-repl.clj
Or is there a better way to do this? Am I over complicating things?
Thanks for reading.
The text was updated successfully, but these errors were encountered:
I don't actually have any trouble running figwheel from Cursive. It's been working well. However, the problem is that I have Clojure and Clojurescript in my project and they (other than CLJC) should not share anything.
So I manage it with profiles but the problem is that I have to apply the profiles before running anything. Though Cursive only reads the default :source-paths as far as I can tell which means I have to put my CLJS paths in there. I have no chance.
Now my clojure code (with dev-clj profile) will merge its source paths when activated and end up with both, cljs and clj source paths. That could be a possible headache down the road so I'd like to keep them separate.
Currently I work around this issue by putting my CLJS source paths into :source-paths and then removing them in all my clojure profiles with ^:replace meta info:
:profiles {
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Main clojure dev environment
:dev-clj
[{:source-paths ^:replace ["env/dev/clj" "src/clj" "src/cljc" "test/clj"]
....
I have exactly the same scenario; clj + cljs in the same project, but wanting to keep their deps separate. Can't run figwheel because I can't find a way to merge profiles when using a clojure.main process.
cursive-ide
added
new
Marks issues describing new features
changed
Marks issues describing changes to existing features
and removed
changed
Marks issues describing changes to existing features
labels
Sep 22, 2020
The motivation behind this is the following:
With projects having both, clojure+cljs in their project structure, there is no single classpath that is appropriate. I then, do not set a
:source-paths
at all in myprofile.clj
but only ever set them in my leiningen profiles. The composite profiles makes this very nice and modular and composable.I also use the profiles to obtain different compilation for cljs projects (debug/production).
The problem is when I want to have a figwheel REPL in Cursive (with the
scripts/figwheel-cljs-repl.clj
method) then the classpaths are not set properly.I'd like to see a
lein run
method in Cursive to start a REPL (Or even more general: Allow any process to start). There I can apply my options and start my figwheel REPL properly:Or is there a better way to do this? Am I over complicating things?
Thanks for reading.
The text was updated successfully, but these errors were encountered: