This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-02
Channels
- # announcements (34)
- # babashka (19)
- # beginners (106)
- # calva (50)
- # cider (25)
- # clj-commons (39)
- # clj-kondo (16)
- # clojure (59)
- # clojure-czech (3)
- # clojure-europe (33)
- # clojure-norway (9)
- # clojure-seattle (1)
- # clojure-sweden (1)
- # clojure-uk (2)
- # clojured (28)
- # clojuredesign-podcast (1)
- # clojurescript (7)
- # code-reviews (19)
- # conjure (15)
- # cursive (3)
- # datomic (3)
- # emacs (21)
- # etaoin (28)
- # graphql (4)
- # introduce-yourself (1)
- # joyride (2)
- # kaocha (2)
- # london-clojurians (8)
- # lsp (24)
- # music (4)
- # nbb (4)
- # nextjournal (1)
- # off-topic (13)
- # other-languages (16)
- # remote-jobs (1)
- # rewrite-clj (6)
- # sci (1)
- # shadow-cljs (40)
- # tools-deps (15)
I started using meta data to flag some functions in different namespaces. I wrote a shadow-cljs hook that compiles a manifest based off of the metadata of functions in different file. This worked great for development.
However, no matter the optimization level I choose, when I go to do a release the value of (get-in build [:compiler-env :cljs.analyzer/namespaces])
is nil
. Is this sort of data located somewhere else for release builds? If not, is there a recommended approach for providing such data to a release build?
edit: actually the :compiler-env
key is not present at all ๐
:compiler-env
is also present always? otherwise pretty much everything would fail ๐
at neither of those stages has any CLJS been compiled so :cljs.analyzer/namepaces
will indeed be missing or empty?
I guess during development you are relying on caching or watch re-entering the :compile-prepare
with data from the previous compile?
my hooks currently cause it to always rebuild twice (havenโt looked into that yet) thatโs probably what was saving me
are you creating files in that hook that will then be used in the compilation? if so don't ๐
well what you could do in the hook is generate is manifest that you actually load dynamically at runtime
I can just only spit the file when :compiler-env
is present, and rely on an outdated version for now
but still no clue how to get that all working properly with caching and hot-reload and everything else ๐
would like to avoid a index.html
loading app
loading manifest
loading split
loading component
situation ๐
> but still no clue how to get that all working properly with caching and hot-reload and everything else you and me both! ๐
well good thing I also have a hook for inlining build data into hiccup files to build my html
Daylight testimony that in shadow we trust ๐