This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-08
Channels
- # aleph (10)
- # announcements (4)
- # beginners (25)
- # calva (4)
- # cider (56)
- # clj-kondo (10)
- # cljdoc (1)
- # cljs-dev (58)
- # clojure (42)
- # clojure-austin (5)
- # clojure-dev (90)
- # clojure-europe (2)
- # clojure-greece (2)
- # clojure-italy (3)
- # clojure-nl (63)
- # clojure-quebec (1)
- # clojure-seattle (2)
- # clojure-spain (4)
- # clojure-spec (19)
- # clojure-uk (25)
- # clojuredesign-podcast (5)
- # clojurescript (24)
- # cursive (15)
- # datomic (1)
- # events (1)
- # figwheel-main (10)
- # fulcro (62)
- # graphql (7)
- # keechma (11)
- # nrepl (1)
- # off-topic (12)
- # re-frame (8)
- # reitit (2)
- # remote-jobs (3)
- # shadow-cljs (127)
- # specter (1)
- # sql (43)
- # testing (2)
- # tools-deps (30)
- # xtdb (1)
CLJS won't do any checking for you - but sure you can look at the AST and sort that out on your own
I guess my question is, if I tag a return value of a function like:
(defn create-element ^react/Element [type props & children]
...)
should that type information bubble up the AST and show in the analyzer on the if
node? I'm thinking of the machinery that the analyzer uses to do type inference could be re-used, but I haven't had the chance to sit down and try itI suppose I could walk the AST and look for literally react/createElement
but that seems brittle
I've seen that, but it wasn't obvious to me from the reading (and reading other material on inference) whether that only worked for simple types like string
/ boolean
or if I could add my own opaque types and the engine would also infer that info
is the output-dir
something that is a good candidate for caching across multiple builds / SHAs in a CI system?
I'm seeing more than 3x longer build times with source-maps enabled (simple opts)
if I let AWS CodeBuild save and restore the output-dir, will CLJS handle the freshness checking correctly?
(I'm assuming the *.cache.json in the output directory is the caching you're referring to @dnolen)
it's disabled by default only because a variety of libraries and tooling do yucky stuff with macros
{:main REDACTED
:output-to "resources/public/js/compiled/app.js"
:output-dir "resources/public/js/compiled/out"
:source-map "resources/public/js/compiled/app.js.map"
:optimizations :simple
:closure-defines {goog.DEBUG false}
:pretty-print false
:externs ["externs/tribute.js"
"externs/keycloak-externs.js"
"externs/vega/vega.ext.js"
"externs/vega/vega-lite.ext.js"
"externs/vega/vega-embed.ext.js"]
:foreign-libs [{:file "resources/public/js/vendor/keycloak/keycloak.js"
:provides ["keycloak-js"]}
{:file "resources/public/js/vendor/vega/vega.min.js"
:provides ["vega"]}
{:file "resources/public/js/vendor/vega/vega-lite.min.js"
:requires ["vega"]
:provides ["vega-lite"]}
{:file "resources/public/js/vendor/vega/vega-embed.min.js"
:requires ["vega" "vega-lite"]
:provides ["vega-embed"]}]}