This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-12
Channels
- # adventofcode (1)
- # announcements (1)
- # atom-editor (4)
- # aws (4)
- # babashka (7)
- # beginners (46)
- # biff (14)
- # calva (11)
- # cljdoc (2)
- # clojure (78)
- # clojure-art (1)
- # clojure-austin (1)
- # clojure-europe (50)
- # clojure-nl (2)
- # clojure-norway (22)
- # clojure-spec (2)
- # clojure-uk (2)
- # clojurescript (72)
- # conjure (6)
- # core-typed (6)
- # eastwood (4)
- # events (1)
- # figwheel-main (11)
- # fulcro (1)
- # guix (1)
- # helix (13)
- # jobs (2)
- # jobs-discuss (4)
- # kaocha (2)
- # malli (5)
- # off-topic (7)
- # pathom (22)
- # pedestal (9)
- # re-frame (29)
- # reagent (7)
- # releases (2)
- # remote-jobs (1)
- # rewrite-clj (12)
- # shadow-cljs (44)
- # sql (13)
- # squint (2)
- # xtdb (17)
is there documentation focused on build performance, specifically, on how to maximise it? parallelism, caching setup, etc
one specific question i have is, can i build multiple targets in parallel, given that they all share a common base module? ideally it'd compile the base first and then compile all the targets in parallel afterwards
@robert-stuttaford build performance is pretty much optimized by default and there are no settings to make it faster, only to disable threads etc which makes it slower
compiling multiple builds in parallel is possible but experience has shown that it is in fact pretty much identical in speed in doing them sequentially
that is because the build already uses a maxed out threadpool, so other builds spent most times waiting
ok, interesting, thank you @thheller!
so given that, the most ideal build set up to take advantage of that is one build with several modules, as that way there'll only be a single cache?
of course
yeah caching is difficult because we use buildkite which uses multiple agents on multiple hosts, so right now we effectively run clean every time. we're going to look into ways to ensure a stable caching setup
one thing I just assumed you are doing which you might not actually be doing is running multiple builds in one command
shadow-cljs release build1 build2
is much faster than shadow-cljs release build1 && shadow-cljs release build2
since only one shadow-cljs instance is started
Hello. Does shadow-cljs
support subpath imports in the context of :esm
target? Or am I doing something wrong? https://github.com/dmg46664/problems/tree/main/02_shadow-subpath-imports
this is not supported but if you are building for node anyways it doesn't need to be supported
you can set :js-options {:js-provider :import}
in the build config as described here https://shadow-cljs.github.io/docs/UsersGuide.html#_third_party_tool_integration
@thheller Thanks.
I'm trying to configure server addr for RN app with :local-ip
option, looks like option from command shadow-cljs watch android --verbose --config-merge '{:local-ip "127.0.0.1"}'
isn't picked up but adding it to ~/.shadow-cljs/config.edn
does work.
Docs mention that --verbose
output should display the used IP(s) but I'm not seeing those messages (https://github.com/thheller/shadow-cljs/blob/846446eb49e51daf9c25b6016603afe38b6d4768/src/main/shadow/cljs/devtools/api.clj#L604 https://github.com/thheller/shadow-cljs/blob/846446eb49e51daf9c25b6016603afe38b6d4768/src/main/shadow/cljs/devtools/api.clj#L604)
This is with 2.20.1
Looks like the ::multiple-ips
log call is inside comment
form now.
And there isn't any ::server-addr
log calls
https://github.com/thheller/shadow-cljs/commit/02ece2f93aa9954e6483faf12019cdf4d1388e0c ::server-addr
log call was removed here
But I don't understand why the option isn't picked up from CLI arguments etc.
this shouldn't be necessary anymore at all? I changed it so it tries all local ips until it finds one that works
Well, my WIFI or firewall is probably blocking all incoming connections, I could figure that out, but I've usually just used adb reverse
to tunnel traffic, in that case the phone needs to access localhost
which isn't included in the list.
I guess I could add support for :local-ip
per build back in (since config-merge only applies to the build config)
The docs mention --config-merge
example: https://shadow-cljs.github.io/docs/UsersGuide.html#repl-trouble-react-native
Looks like the localhost version isn't going to work as RN/JS forbids access to localhost
Which is interesting because RN packager is connected through localhost... But I'll just figure out why the phone can't connect to Shadow-Cljs with the LAN IP
Should the multiple-ips log call here be enabled: https://github.com/thheller/shadow-cljs/blob/846446eb49e51daf9c25b6016603afe38b6d4768/src/main/shadow/cljs/devtools/api.clj#L628 ?
I'm trying to use "preact/hooks"
in a cljs app, but every time I try to use one of the hooks, I get an error like this:
Cannot read properties of undefined (reading '__H')
it happens in the repl and when running the app.
the require looks roughly like this in the app: (:require ["preact/hooks" :refer [useState]])
anyone happen to know why I might be getting that error and/or what I'm missing?
Hi Thomas, thanks for all the support! Regarding externs again – they are all summed up before being fed to Closure, right? Let’s say we have: • simplified externs/app.txt • and externs/app.js They both will be fed to Closure compiler, right? Or are these mutually exclusive?