This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-14
Channels
- # beginners (116)
- # boot (6)
- # cider (16)
- # cljdoc (5)
- # cljsrn (3)
- # clojure (156)
- # clojure-conj (5)
- # clojure-finland (1)
- # clojure-italy (46)
- # clojure-mexico (36)
- # clojure-russia (2)
- # clojure-sanfrancisco (1)
- # clojure-spec (10)
- # clojure-uk (69)
- # clojurescript (71)
- # core-async (2)
- # cursive (18)
- # datomic (91)
- # duct (2)
- # editors (1)
- # emacs (5)
- # figwheel-main (11)
- # fulcro (31)
- # graphql (8)
- # hispano (1)
- # jobs (1)
- # jobs-discuss (2)
- # lambdaisland (1)
- # london-clojurians (1)
- # nyc (1)
- # off-topic (104)
- # onyx (34)
- # parinfer (3)
- # pedestal (2)
- # precept (17)
- # protorepl (2)
- # re-frame (13)
- # reagent (4)
- # ring-swagger (52)
- # shadow-cljs (92)
- # spacemacs (17)
- # sql (14)
- # tools-deps (6)
- # unrepl (4)
- # vim (39)
Just wanted to confirm: (:require ["react-virtualized" :refer (Column Table)]) does NOT do tree shaking.
so this is recommended (as in docs): (:require ["react-virtualized/dist/commonjs/AutoSizer" :default virtual-auto-sizer] ["react-virtualized/dist/commonjs/List" :default virtual-list]))
its a bit more efficient to use the es
version "react-virtualized/dist/es/AutoSizer"
we already had :infer-externs :auto
turned on and changing to simple (instead of advanced) solved the issue
Hmm just speaking with my team-member it was specifically to do with some middleware and an exception handling callback
hmm? do you mean that the JS is accessing a property from CLJS that is getting renamed?
ok that's interesting, I can see a line which looks suspect so I'll take a look at that specific bit
I receive a couple of warnings with transit-cljs
, not a big deal, just wanted to report them:
------ WARNING #2 --------------------------------------------------------------
File: com/cognitect/transit/impl/writer.js:256:8
variable isObject is undeclared
--------------------------------------------------------------------------------
------ WARNING #3 --------------------------------------------------------------
File: com/cognitect/transit/types.js:384:70
variable Buffer is undeclared
also, is there a way to disable warning colors?
kk cool
is anything we can do about that > contributing it? it is quite annoying in CI 😄
actually...let me explore the code 😉
ah nice
but yeah...will get back to you, thanks for now 😄
If I run shadow-cljs release app
, the first time I will get an error compiling my code but subsequent runs the error is not printed. This behavior does not make sense to me.
------ ERROR -------------------------------------------------------------------
File: /home/kenny/compute_software/ui-frontend/src/compute/ui_frontend/core.cljs:41:3
--------------------------------------------------------------------------------
38 | []
39 | (s/check-asserts true)
40 | (set! s/*explain-out* expound/printer)
41 | (st/instrument)
---------^----------------------------------------------------------------------
Unable to resolve var: def-command-spec in this context at line 41 compute/ui_frontend/core.cljs
--------------------------------------------------------------------------------
I'm not sure why that code is even getting compiled. It is located in this function:
(defn init-dev-tools
[]
(s/check-asserts true)
(set! s/*explain-out* expound/printer)
(st/instrument)
nil)
which is called like this:
(when ^boolean goog.DEBUG
(init-dev-tools))
Ok, I can do that. I would've thought that because that function call never occurs DCE would remove expound and st.
yeah don't rely on DCE too much. there are lots of things that it can't remove. especially things the st
ns does
Oh, and the problem only occurs when I call def-command-spec
in the same ns it is defined in.
but the ns is still cached so the side effects won't happen when using the cached code
otherwise the st/instrument
code won't actually instrument anything since your code isn't loaded yet
What's the way to resolve classpath conflicts in the most recent 2.5.0 version of shadow cljs? I have tried the re-frame conduit example. The compilation errors out because apparently an old version of re frame gets loaded. It's surprising because the dependencies vectors in shadow-cljs.edn explicitly lists a more recent version of re-frame. I have tried using exclusions but couldn't get it to work either.
reagent
is an explicit dependency but re-frame depends on reagent/reagent
. guess tools.deps doesn't de-dupe those
Suppose I want to use some javascript library only while in development. How would one go about setting this up?
But then do I have to require this code in a namespace that is not reachable from the build's :entries?
I'll see if I can use this code by eval'ing in cider-emacs I suppose this code that get required in dev/user.cljs will not get included in any build output provided it isn't called via code in the :entries namespaces.
yes :preloads
is for dev-only code. the ns
included via :preloads
must however not the required by anything else
otherwise you might just leave it out of :preloads
entirely since it will be included anyways
this is an option if you want to just remove one require https://shadow-cljs.github.io/docs/UsersGuide.html#_conditional_reading
aaaarg so excited about the new runtime dep feature........
shadow.user> (shadow/reload-deps! '{specs {:local/root "../spec-cljs"}})
:shadow.cljs.devtools.api/standalone-only
shadow.user>
so nice that we have it in there though