This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-07-25
Channels
- # announcements (1)
- # babashka (15)
- # biff (15)
- # calva (9)
- # cherry (18)
- # cider (43)
- # cljs-dev (1)
- # cljsrn (10)
- # clojure (14)
- # clojure-europe (47)
- # clojurescript (29)
- # clr (5)
- # conjure (1)
- # core-logic (17)
- # datomic (8)
- # emacs (22)
- # fulcro (3)
- # gratitude (1)
- # hoplon (23)
- # humor (1)
- # hyperfiddle (34)
- # jobs (1)
- # kaocha (1)
- # malli (3)
- # nrepl (4)
- # off-topic (18)
- # pathom (12)
- # pedestal (1)
- # polylith (1)
- # portal (17)
- # practicalli (1)
- # re-frame (19)
- # reitit (8)
- # releases (1)
- # rewrite-clj (4)
- # shadow-cljs (15)
- # sql (23)
- # tools-build (4)
So, having an issue. For fullstack apps, Calva recommends jacking in with the "Sbadow-cljs" setting pointing shadow-cljs.edn
deps to your deps.edn
file like this.
:deps {:aliases [:shadow :dev :flow]}
What I'm not clear on is whether there's a way to do this in different builds of shadow-cljs. This seems to be a top level option and it means I can't just have a release build and a dev build like when I'm launching from just Clojure + deps.edn. Is there no way around this? Otherwise I'm just adding from the :aliases
field based on what I'm doing
I’m not completely sure I understand the question, but you can provide aliases via a custom repl connect sequence, cljAliases. Is that what you need?
So I'm starting from jack-in. There's a part in the calva docs that recommends using shadow-cljs
vs deps.edn + shadow.cljs
. When doing that, it starts with
npx shadow-cljs
. It lets me pick different shadow-cljs builds, but the shadow-cljs builds can't pick different deps.edn
builds. They just go off the top level aliases
// shadow-cljs.edn
{:nrepl {:port 7002}
:deps {:aliases [:shadow :dev :flow]}
:builds {:prod {:target :browser
:output-dir "target/classes/cljsbuild/public/js"
:asset-path "/js"
:modules {:app {:entries app.core]
:init-fn app.core/init!}}
:devtools {:watch-dir "resources/html"}}}}
So :prod
will always use :dev
in deps.edn
Is there a way around this? Calva is fairly hard to use without doing these aliases in a full stack app.For instance, I could take out :dev
and :flow
from the aliases and just have it use CLJS stuff, but then I have to run it with the deps.edn + shadow.cljs
, which the Calva docs recommend against for logging reasons
Looks like you already asked this, Pez, so I'm gonna continue this thread here https://clojurians.slack.com/archives/C6N245JGG/p1655282618808169 Only thing is my build uses ClojureStorm (part of flowstorm) which involves overriding the default clojure compiler. Not really something I want to do in Prod
I don’t think we recommend either way any longer. It’s rather a preference/depends on what goes in the shadow-cljs output.
Calva and shadow-cljs do have mechanisms for specifying the aliases with the repl start command line.
For Calva, I don't believe there's a way to do this without making a custom jack-in command, right?. You can specify the shadow-cljs build but not the clj aliases it uses
Lingy 0.1.19 just dropped https://metacpan.org/release/INGY/Lingy-0.1.19/view/lib/Lingy.pm • Adds initial nREPL support (thanks @pez!!) • Clojure's own @pez is now a Lingy author
