This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-06
Channels
- # bangalore-clj (16)
- # beginners (120)
- # boot (21)
- # cider (24)
- # clara (9)
- # cljs-experience (1)
- # cljsrn (1)
- # clojure (218)
- # clojure-dev (3)
- # clojure-italy (12)
- # clojure-losangeles (4)
- # clojure-norway (2)
- # clojure-russia (2)
- # clojure-spec (19)
- # clojure-uk (178)
- # clojurescript (52)
- # cursive (7)
- # data-science (55)
- # datomic (25)
- # defnpodcast (11)
- # emacs (5)
- # fulcro (27)
- # hoplon (2)
- # leiningen (14)
- # midje (9)
- # off-topic (132)
- # onyx (19)
- # other-languages (23)
- # portkey (2)
- # re-frame (31)
- # reagent (1)
- # ring-swagger (15)
- # shadow-cljs (58)
- # slack-help (13)
- # spacemacs (22)
- # sql (7)
- # test-check (13)
@mhuebert I think I covered most cases for externs inference now. if you can please test [email protected]
.
true
still requires the (set! *warn-on-infer* true)
, :auto
just does it for files (not jars), :all
for everything but thats not safe
eg. (doto ^js out (.push (-to-element el))))
this doesn’t need to be annotated anymore since .push
is defined in Array externs
@thheller I really like the idea of these obvious cases (like .push
) being taken care of
I am getting this error:
-> Closure - Optimizing ...
IllegalArgumentException: Don't know how to create ISeq from: com.google.javascript.jscomp.SourceFile$Preloaded
clojure.lang.RT.seqFrom (RT.java:550)
clojure.lang.RT.seq (RT.java:530)
clojure.core/seq--5124 (core.clj:137)
clojure.core.protocols/seq-reduce (protocols.clj:24)
clojure.core.protocols/fn--7829 (protocols.clj:75)
clojure.core.protocols/fn--7829 (protocols.clj:75)
clojure.core.protocols/fn--7781/G--7776--7794 (protocols.clj:13)
clojure.core/reduce (core.clj:6748)
clojure.core/into (core.clj:6815)
clojure.core/into (core.clj:6807)
shadow.build.closure/load-externs (closure.clj:392)
and can confirm it happens in 2.0.60. when i reverted to 2.0.59, it kept happening until I deleted target
@eveko usually you need to first install the dependency via npm, say npm install thing
. then in your (ns your.app (:require ["thing" :as thing]))
ok build succed now time to run the server and see if reagent manages to do anything remotely sane
@dustingetz you ask tough questions 🙂 you could probably look at https://github.com/lambdaisland/npmdemo to get a glimpse of whats different
I like to stay away from directly comparing to other tools myself since I haven’t used any of them
thank you
@dustingetz I also wrote https://code.thheller.com/blog/shadow-cljs/2017/09/15/shadow-cljs-introduction.html which covers some of the rationale
I started putting together a quickstart for shadow-cljs recently https://github.com/shadow-cljs/quickstart-browser
what do you think is easier for beginners? should I just stick with the command line or use the REPL?
Damn just tried out shadow-cljs for the first time. I wanted to consume certain npm-modules which I never got working with the new npm-deps stuff. And I just tried it out with shadow-cljs and it somehow just works! Pretty damn cool
I do have one question about the release task does it use advanced compilation? Because it does not see to me that it does
it depends on the :target
you are using. :browser
defaults to :advanced
, the node targets default to :simple
but since most stuff from npm doesn’t work with :advanced
it will only use :simple
for that
Ah so if you add npm-deps it will use simple for everything or only for the node deps and then the rest with advanced?
Damn that is cool
you can also try advanced for everything by setting :js-options {:js-provider :closure}
but as you experienced that doesn’t work all too well 😉
Very true, right now we have some webpack build and then we add stuff to window
which I hate so this is already 1000 times better
from a technical perspective I pretty much do the same thing webpack
does, just better integrated 😉
Still love not having two tools ^^