This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-20
Channels
- # announcements (2)
- # architecture (5)
- # beginners (118)
- # cider (5)
- # clara (13)
- # cljdoc (8)
- # cljs-dev (49)
- # cljsjs (2)
- # clojure (107)
- # clojure-dev (9)
- # clojure-europe (3)
- # clojure-italy (58)
- # clojure-japan (2)
- # clojure-nl (6)
- # clojure-spec (89)
- # clojure-uk (27)
- # clojurescript (9)
- # core-async (33)
- # cursive (2)
- # datascript (2)
- # datomic (31)
- # duct (4)
- # emacs (1)
- # events (1)
- # figwheel-main (1)
- # fulcro (69)
- # hoplon (7)
- # hyperfiddle (16)
- # incanter (4)
- # instaparse (4)
- # kaocha (1)
- # mount (2)
- # nrepl (19)
- # off-topic (40)
- # onyx (6)
- # other-languages (3)
- # pedestal (2)
- # re-frame (48)
- # reagent (2)
- # reitit (10)
- # ring-swagger (9)
- # shadow-cljs (63)
- # spacemacs (13)
- # sql (8)
Hi all, hi Thomas! I am looking into https://github.com/thheller/shadow-cljs/issues/407 and would like to ask how to apply :exclusions
to the shadow dependency if I am using it through package.json
. I tried a couple of things to no avail
well I am using deps.edn
but not for shadow, cause the automatic detection of server mode is not working unless I have it in package.json
. Am I right?
@richiardiandrea no that has nothing to do with it. it just looks for .shadow-cljs/http.port
file which is written when the server is started
is this configurable? If so in a monorepo I could start yarn shadow-cljs server
from the parent and all the child projects could connect to it
@U05224H0W yes I do not care in CI but I could potentially care and shed off 3 seconds per sub project 😄
the time you spent thinking about ways to get rid of 3sec startup time already accounts for about 1000 project starts
and no you cannot share a server instance between projects. they are isolated on purpose
Ah ah I wish it was like you said, also this shaving off is way more important for my team than my time spent thinking about it apparently. That's why I am trying hard to improve things 😄
No they cd into the lamdba project and start a watch
Give me a sec will be back
so they start a server instance in the project of the lambda they want to work on
and the following commands are correctly avoiding startup time
but sometimes you want to run commands in two lambdas, now you need two JVMs
my boss does not want to do that, he says that the tool should be smarter 😄
:source-paths ["lambda1/src/main" "lambda2/src/main"]
and just create a combined config
Yeah I can do that. Would you be open to adding some sort of magic that helps with this kind of setup (monorepo) so that the merge is done automatically?
Yep but in a monorepo is in general what you want, so you can just error out (like you already do for transitive node_modules
...nice touch btw)
I am actually manually keeping Clojure deps.edn in sync making sure I have the same version everywhere
it's painful 😄
something that does this for me would be awesome...now - this probably would be better in a separate lib
but shadow-cljs
could wrap the lib and provide a fully fledged solution for monorepos
if everything is already in one repo and we already have namespaces to separate everything ...
just add :source-paths ["lambda1/src" ...]
and in the builds just use :app-dir
"lambda1/output"` or whatever
what is the point of separating everything if combining it is actually what you want?
just write a shell script that takes the nested shadow-cljs.edn
files .. extracts the builds and rewrites the paths
FWIW if you can create a "demo" monorepo that demonstrates your setup I can maybe think of something to do
but right now it just feels like you are shooting yourself in the foot for "reasons"
yeah sometimes you have to take decisions you don't agree with...but thanks for trying to find solutions.
well there was a reason we discussed and we ended up deciding not to use deps.edn
....if there is no reason I can think about moving 😉
still don't actually recommend using deps.edn
but if you want to tweak stuff for CI thats your best option currently
ok that's cool I can tweak that then - thanks for clarifying