Fork me on GitHub
#shadow-cljs
<
2018-04-23
>
steveb8n02:04:19

Hi everyone, over the weekend I knocked up https://github.com/stevebuik/Stu

😃 8
steveb8n02:04:45

still lots of work to be done, including better docs but feel free to download and try it out

steveb8n02:04:32

I’ll log issues today for all the roadmap stuff. then we’d really appreciate any help with PR’s to make Stu even more powerful

teawaterwire15:04:07

I'm using shadow-cljs in a project and I noticed a steep increase of compile time when I added some npm deps: before:

[:app] Compiling ...
[:app] Build completed. (338 files, 2 compiled, 0 warnings, 0.81s)
[:app] Compiling ...
[:app] Build completed. (338 files, 2 compiled, 0 warnings, 0.94s)
I added:
(:require ["firebase/app" :as firebase]
          ["firebase/auth"]
          ["firebase/database"])
And now I'm seeing smth like:
[:app] Compiling ...
[:app] Build completed. (592 files, 2 compiled, 0 warnings, 5.14s)
[:app] Compiling ...
[:app] Build completed. (592 files, 2 compiled, 0 warnings, 4.44s)
How could I mitigate that and keep the same developper experience? 🙂

thheller15:04:34

which version? did some tweaks recently which should have fixed that

thheller15:04:11

can you run with shadow-cljs watch app --verbose please and tell me where the time is going?

teawaterwire15:04:09

hum restarting the shadow server and now I'm back to the fast compilation :thinking_face:

thheller15:04:45

hmm you are the second to report this now. no idea what might be happening.

teawaterwire15:04:47

to be fair, I think I kept the shadow server running for 3 days 😅 — it reported some errors but kept running:

[2018-04-22 18:56:31 - WARNING] classpath update failed
...
clojure.lang.ExceptionInfo: failed to inspect cljs file

teawaterwire15:04:06

should I update to 2.3.1 ? while I'm at it 😁 : do we need the local npm install of shadow even though it's installed globally?

thheller15:04:58

yes, always in the project

teawaterwire15:04:42

ok, thanks! :thumbsup:

lilactown16:04:03

if I wanted to develop + release a cljs lib - should I use leiningen for that?

thheller16:04:29

for the final lein deploy yes 😉

lilactown16:04:49

is there any example/boilerplate around that I could follow?

thheller16:04:35

the usual lein instructions I guess

lilactown16:04:39

i’ve honestly never tried to release a pure cljs lib before

lilactown16:04:59

I don’t need to compile it for release, right?

thheller16:04:13

no, no compiled code at all. only the source files

thheller16:04:36

(defproject your/lib "version"
  :dependencies
  [...]
  :source-paths
  ["src"])

thheller16:04:40

then lein deploy clojars

thheller16:04:10

if you are using the resources dir make sure its empty and doesn't inlude anything compiled

thheller16:04:16

otherwise it will end up in the .jar

thheller16:04:56

you can run lein jar and then jar -tvf target/your-lib-version.jar to verify what is in it

thheller16:04:27

you can add

:repositories
  {"clojars" {:url ""
              :sign-releases false}}
if you don't want to deal with the gpg stuff

👍 4
bhauman17:04:56

@thheller whats the list of "on-reload" client side hooks are you using again?

lilactown17:04:46

thx thheller!

thheller17:04:06

@bhauman for ns :dev/always -> :figwheel-always and :dev/once -> :figwheel-noload

thheller17:04:36

the :figwheel-* are also supported, so either works

bhauman17:04:57

I was thinking the meta data on client side reload hooks

thheller17:04:39

so :dev/before-load + :dev/before-load-async to call before reloading any code

thheller17:04:56

:dev/after-load + :dev/after-load-async

lilactown23:04:00

I just upgraded to 2.2.31. Seeing this now in my Node.js build:

shadow-cljs - Using IP "10.240.18.219" from Interface "utun1"
Apr 23, 2018 4:23:05 PM shadow.cljs.devtools.server invoke
INFO: Found multiple IPs, might be using the wrong one. Please report all interfaces should the chosen one be incorrect.
and in the app itself:
REPL client error { Error: connect ETIMEDOUT 10.240.18.219:9630
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1174:14)
  errno: 'ETIMEDOUT',
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '10.240.18.219',
  port: 9630 }
REPL client disconnected

lilactown23:04:45

2.2.29 seems to work fine. 2.3.0 also exhibits this behavior