This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-16
Channels
- # announcements (16)
- # asami (5)
- # aws (2)
- # babashka (4)
- # beginners (22)
- # calva (28)
- # cider (3)
- # clj-kondo (1)
- # cljdoc (13)
- # cljs-dev (16)
- # clojure (3)
- # clojure-australia (1)
- # clojure-europe (25)
- # clojure-gamedev (1)
- # clojure-germany (2)
- # fulcro (34)
- # helix (4)
- # jobs-discuss (16)
- # leiningen (10)
- # malli (20)
- # meander (7)
- # nrepl (35)
- # off-topic (1)
- # portal (13)
- # ring-swagger (3)
- # shadow-cljs (34)
- # tools-deps (7)
- # vim (1)
Hello. On a specific setup involving both deps.edn
and shadow-cljs
I’m running into this issue: https://github.com/clojure-emacs/cider/issues/2812
Interesting find. If it works for you, try jacking in to the project as a shadow-cljs
project type. (It’s unclear if you do it this way already, but anyway.)
I’ve jacked in as deps.edn + shadow
if I jack in just as shadow there are other issues
Well, this template has some deps defined in deps.edn
and those don’t get found so the app isn’t compiled consequently
This doesn’t relate to Calva directly
{:deps true
:nrepl {:port 8777}
:builds {:app {:target :browser
:output-dir "resources/public/js/compiled"
:asset-path "/js/compiled"
:modules {:app {:init-fn craftybones.re-frame-test.core/init
:preloads [devtools.preload]}}
:devtools {:http-root "resources/public"
:http-port 8280
}}}}
and the deps.edn
as follows:
{:paths ["src" "resources"]
:deps {org.clojure/clojure #:mvn{:version "1.10.1"}
org.clojure/clojurescript
{:exclusions [com.google.javascript/closure-compiler-unshaded
org.clojure/google-closure-library
org.clojure/google-closure-library-third-party]
:mvn/version "1.10.597"}
seancorfield/clj-new {:mvn/version "1.0.199"}
re-com #:mvn{:version "2.7.0"}
re-frame #:mvn{:version "0.11.0"}
reagent #:mvn{:version "0.9.1"}
thheller/shadow-cljs #:mvn{:version "2.8.96"}}
:aliases
{:dev {:extra-deps {binaryage/devtools #:mvn{:version "1.0.0"}
day8.re-frame/re-frame-10x #:mvn{:version "0.5.1"}
day8.re-frame/tracing #:mvn{:version "0.5.3"}}
:extra-paths ["src" "dev"]}}
Yes, they are
The way this works is that shadow-cljs will use clojure
to start the project. And it needs to know which aliases to activate.
Right. Trying
Worked!
Thanks
so, now if I need to shift aliases, I’d have to go change it in shadow-cljs.edn
Yes, that’s the downside, but usually I find you don’t need to shift such things often. You can also run the deps project and the shadow project in separate vs code windows. That has another issue, but there also seems to be a workaround for that: https://github.com/BetterThanTomorrow/calva/issues/1313
Can I run shadow-cljs from command line and just plugin the repl from Calva instead? So don’t jack in basically but just connect to a running repl?
A small cost to pay I suppose. So far, I’m a little irritated with shadow. A lot of setup as opposed to figwheel
Yes, you can do that as well. If you copy the command that Calva uses for jack-in and then adapt it so that you inject the aliases there, that should work.
I find shadow setup to be far easier than figwheel, but I guess it is a matter of taste as well.
Do you know if there’s an easy way of setting up multiple entry points in shadow? Something like extra-mains
in figwheel?
Is there a workaround in Calva?
When I jack in, I run into the same missing instance problem.