Fork me on GitHub
#shadow-cljs
<
2018-07-01
>
wilkerlucio02:07:54

I have some code where a depnedency is triggering a warning

wilkerlucio02:07:29

and that's preventing shadow to reload the code, the HUD stays on, nothing is notified, at console it says it compiled and show warnings on dep libraries

thheller07:07:52

@dpsutton never seen that error before. shadow-cljs doesn't use anything from javafx so its weird to get an error like that. IIRC only the nashorn CLJS REPL uses the javafx stuff. it looks like you are using the JRE thought and not the JDK?

thheller07:07:56

@wilkerlucio thats a pretty vague description. typically warnings from libraries should only be shown once and not interfere with the live reload IF they come from the jar?

wilkerlucio12:07:16

@thheller yeah, I found it strange, in this case Im back using deps.edn, and the package causing the issue is the core.matchers, I’ll try to make an example and send as an issue, I was wondering if just that description would make something click for you

bolasblack13:07:09

WOW, I just tried fspec and seems the related issue has been fixed, thanks thheller!

urbanslug13:07:13

Anyone here using sass?

urbanslug13:07:24

Mind telling me how you got that working?

thheller16:07:24

@urbanslug I'm using node-sass in my work project directly from the CLI, didnt' try any of the JVM related sass tools.

thheller16:07:10

@wilkerlucio ah are you using git deps? The logic for warnings currently assumes that all "library" code lives in jars but in case of git deps they are actual files so they are treated like project code with "sticky" warnings

urbanslug16:07:09

@thheller does that work with live reload?

urbanslug16:07:32

Oh you have the node-sass tool running concurrently?

thheller16:07:52

node-sass is running separately yes but the css is live reloaded as well

justinlee17:07:30

@urbanslug i just fire off of a node-sass watcher using npm, which also fires up my api server and the shadow watch. i also have the npm-run-all package installed so i an run things in parallel in one terminal using run-p. pretty handy for simple build script stuff

urbanslug17:07:27

@thheller Ah I see > shadow-cljs currently provides no support for directly compiling CSS but the usual tools will work and should be run separately. Just make sure the output is generated into the correct places.

wilkerlucio18:07:47

@thheller yes I'm using a git dep, but the code triggering the warning is not a git dep

thheller18:07:54

what kind of warning are we talking about here? is it a public lib?

wilkerlucio18:07:19

------ WARNING #1 --------------------------------------------------------------
 File: clojure/math/combinatorics.cljc:278:26
--------------------------------------------------------------------------------
 275 |         indices (apply concat
 276 |                        (for [i (range (count v))]
 277 |                          (repeat (f (v i)) i)))]
 278 |     (map (partial map v) (lex-permutations indices))))
--------------------------------^-----------------------------------------------
 clojure.math.combinatorics/lex-permutations is deprecated
--------------------------------------------------------------------------------
 279 |
 280 | (defn permutations
 281 |   "All the distinct permutations of items, lexicographic by index
 282 | (special handling for duplicate items)."
--------------------------------------------------------------------------------

------ WARNING #2 --------------------------------------------------------------
 File: clojure/math/combinatorics.cljc:285:29
--------------------------------------------------------------------------------
 282 | (special handling for duplicate items)."
 283 |   [items]
 284 |   (cond
 285 |     (sorted-numbers? items) (lex-permutations items),
-----------------------------------^--------------------------------------------
 clojure.math.combinatorics/lex-permutations is deprecated
--------------------------------------------------------------------------------
 286 |
 287 |     (all-different? items)
 288 |     (let [v (vec items)]
 289 |       (map #(map v %) (lex-permutations (range (count v)))))
--------------------------------------------------------------------------------

------ WARNING #3 --------------------------------------------------------------
 File: clojure/math/combinatorics.cljc:289:23
--------------------------------------------------------------------------------
 286 |
 287 |     (all-different? items)
 288 |     (let [v (vec items)]
 289 |       (map #(map v %) (lex-permutations (range (count v)))))
-----------------------------^--------------------------------------------------
 clojure.math.combinatorics/lex-permutations is deprecated
--------------------------------------------------------------------------------
 290 |
 291 |     :else
 292 |     (multi-perm items)))
 293 |
--------------------------------------------------------------------------------

wilkerlucio18:07:28

yes, org.clojure/math.combinatorics

thheller18:07:15

Exception in thread "async-dispatch-8" java.lang.OutOfMemoryError
        at java.base/java.lang.AbstractStringBuilder.hugeCapacity(AbstractStringBuilder.java:188)
        at java.base/java.lang.AbstractStringBuilder.newCapacity(AbstractStringBuilder.java:180)
        at java.base/java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:147)
        at java.base/java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:512)
        at java.base/java.lang.StringBuffer.append(StringBuffer.java:275)
        at java.base/java.io.StringWriter.write(StringWriter.java:106)

thheller18:07:39

the :build-complete message never makes it to the client since it fails printing

thheller18:07:14

wonder why its so large

thheller18:07:29

alright there seems to be some circular structure in there

thheller18:07:36

geez it dumps the entire analyzer env into the warning data

eoliphant21:07:48

Hi, I’m running into a weird issue. I’m using shadow-cljs with lein. and getting this error, despite the fact that querystring is very much installed my node_modules

shadow-cljs - config: /Users/ericholiphant/projects/fm-ui/shadow-cljs.edn  cli version: 2.4.13  node: v10.5.0
shadow-cljs - running: lein run -m shadow.cljs.devtools.cli --npm watch app
Jul 01, 2018 5:00:34 PM org.xnio.Xnio clinit
INFO: XNIO version 3.3.8.Final
Jul 01, 2018 5:00:34 PM org.xnio.nio.NioXnio clinit
INFO: XNIO NIO Implementation Version 3.3.8.Final
shadow-cljs - HTTP server for :app available at 
shadow-cljs - server version: 2.4.12
shadow-cljs - server running at 
shadow-cljs - socket REPL running on port 56649
shadow-cljs - nREPL server started on port 9000
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build failure:
The required JS dependency "querystring" is not available, it was required by "node_modules/url/url.js".

Searched in:/Users/ericholiphant/projects/fm-ui/node_modules

You probably need to run:
  npm install querystring

thheller21:07:46

hmm second time I see this now

thheller21:07:12

@eoliphant can you please check if you have shadow-cljs as a dep in your project?

thheller21:07:23

if not add it and re-test

eoliphant21:07:25

in project.clj?

eoliphant21:07:30

yeah it’s there one sec

thheller21:07:33

no package.json

thheller21:07:40

just npm install shadow-cljs

eoliphant21:07:20

dammit.. lol, that was it

thheller22:07:04

hmm yeah but thats totally not intentional, just remembered that https://github.com/webpack/node-libs-browser has a "polyfill" for "querystring"

thheller22:07:22

but if querystring is actually installed it should probably just be using that