This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-24
Channels
- # aws (2)
- # babashka (27)
- # beginners (97)
- # calva (1)
- # cherry (12)
- # cider (6)
- # clara (12)
- # clj-kondo (24)
- # clj-on-windows (4)
- # cljfx (14)
- # clojure (54)
- # clojure-australia (3)
- # clojure-europe (26)
- # clojure-nl (1)
- # clojure-norway (4)
- # clojure-uk (9)
- # clojurescript (65)
- # conjure (5)
- # cursive (7)
- # datomic (18)
- # emacs (6)
- # helix (2)
- # honeysql (1)
- # jobs (1)
- # joyride (15)
- # kaocha (2)
- # lsp (10)
- # malli (5)
- # nbb (12)
- # observability (5)
- # off-topic (5)
- # reitit (2)
- # releases (4)
- # ring (1)
- # sci (17)
- # shadow-cljs (34)
- # testing (29)
- # tools-deps (45)
- # vim (7)
- # xtdb (6)
I have some metadata I include on some function Vars that is only used for development-time tooling. I am wondering if there is a solution to remove this metadata for release builds - would this be possible with a build hook? I was thinking to walk all the namespaces in the build and update the var metadata before compilation. Does this make sense or is there a better strategy?
answering my own question - unless you explicitly call (meta (var my.ns/a-fun))
the function metadata does not appear to be included in the release builds by default! great!
Sorry to keep on with this I'm just trying to figure out how to get my intellisense working -- does anyone have any documentation on the import cljs from "goog:cljs.core"
style statement? I cannot find anything on this anywhere. Is the goog:
part a shadow convention or is that a google closure compiler convention?
I understand that -- I'm looking for a layer deeper because I'm trying to get the intellisense in my javascript IDE to pick up (compiled) ClojureScript code
there's no intellisense on cljs
when I do import cljs from "goog:cljs.core";
but if I write some "resolve as" code it will work -- just need a few more clues about how it works under thehood
In the begin of each file there's a call to goog.provide https://google.github.io/closure-library/api/goog.html#provide to create the namespace (with the google closure api)
wow, dang
hang on -- I think this is talking about something else. I would expect that to be goog.require
I've just exposed the shadowcljs side
The goog:
part is from google closure api
I've heard that but I can't find any docs on it
https://developers.google.com/s/results/closure/library?q=goog%3A&text=import%20%22goog%3A%22 , but nothing there really
the goog:
part is some obscure and mostly undocumented feature in the closure compiler
I'm assuming it is referencing code the in cljs-runtime
directory but it's not obvious to me how
when the closure compiler compiles ESM import
files it just rewrites them to remove import
and export
and instead replaces everything with global references
so cljs-runtime
doesn't play a role in this in any way, apart from that being the location where the files end up 😉
Ohhhh clever
I upgraded a project from 2.11.23 to 2.20.5. previously index files in sub directories were respected and after upgrade only the top level index is respected.
public
index.html
sub-app
index.html
any ideas to serve sub-app/index.html when localhost:8280/sub-app url is hit (other than downgrading)?i initially upgraded because binaryage/oops
was complaining about js-fn? not existing. It looks like if i jump to 2.12.7 i fix the binaryage/oops
error and still get the same index serving pattern.
I assume you use :dev-http
where you can set :use-index-files true
to get back the old behavior
:builds {:app {:devtools
{:http-root "public"
:http-port 8280
:preloads [devtools.preload day8.re-frame-10x.preload portal.preload]}
Ohhhh clever