Fork me on GitHub
#shadow-cljs
<
2018-10-04
>
vigilancetech00:10:45

any idea what might be causing this?

vigilancetech04:10:23

can anyone see the screenshot I just posted? I got a nag about being out of slack space (even tho I only have 3 tiny files uploaded)

👍 4
vigilancetech13:10:57

Doesn't shadow use my local .m2 repo? The source code I had up in that screen shot is the version installed in it

thheller14:10:03

@vigilancetech it uses ~/.m2 and whichever version you have specified in your dependencies yes

vigilancetech17:10:07

@thheller ok, yeah, my fault. It compiled. Thanks! Now to see if it worked 🙂

thheller18:10:02

did you figure out the hoplon .hl -> cljs compile?

priornix18:10:03

Hmm, shadow-cljs clj-run does not seem to work?

priornix18:10:26

shadow-cljs.edn  cli version: 2.6.10  node: v10.11.0
shadow-cljs - starting ...
failed to run function: demo.build/dev
{:tag :shadow.cljs.devtools.cli/clj-run, :main-sym demo.build/dev}
ExceptionInfo: failed to run function: demo.build/dev
	clojure.core/ex-info (core.clj:4739)
	clojure.core/ex-info (core.clj:4739)
	shadow.cljs.devtools.cli/do-clj-run (cli.clj:129)
	shadow.cljs.devtools.cli/do-clj-run (cli.clj:84)
	shadow.cljs.devtools.cli/blocking-action (cli.clj:145)
	shadow.cljs.devtools.cli/blocking-action (cli.clj:135)
	shadow.cljs.devtools.cli/main (cli.clj:196)
	shadow.cljs.devtools.cli/main (cli.clj:151)
	clojure.core/apply (core.clj:661)
	clojure.core/apply (core.clj:652)
	shadow.cljs.devtools.cli/-main (cli.clj:238)
	shadow.cljs.devtools.cli/-main (cli.clj:236)
	clojure.lang.Var.applyTo (Var.java:702)
	clojure.core/apply (core.clj:657)
	clojure.main/main-opt (main.clj:317)
	clojure.main/main-opt (main.clj:313)
	clojure.main/main (main.clj:424)
	clojure.main/main (main.clj:387)
	clojure.lang.Var.applyTo (Var.java:702)
	clojure.main.main (main.java:37)
Caused by:
NullPointerException:
	clojure.core/deref-future (core.clj:2292)
	clojure.core/deref (core.clj:2312)
	clojure.core/deref (core.clj:2298)
	shadow.cljs.devtools.server.supervisor/active-builds (supervisor.clj:14)
	shadow.cljs.devtools.server.supervisor/active-builds (supervisor.clj:12)
	shadow.cljs.devtools.api/worker-running? (api.clj:132)
	shadow.cljs.devtools.api/worker-running? (api.clj:128)
	shadow.cljs.devtools.api/watch (api.clj:207)
	shadow.cljs.devtools.api/watch (api.clj:201)
	shadow.cljs.devtools.api/watch (api.clj:205)
	shadow.cljs.devtools.api/watch (api.clj:201)
	demo.build/dev (build.clj:9)
	demo.build/dev (build.clj:6)
	clojure.lang.Var.applyTo (Var.java:702)
	clojure.core/apply (core.clj:657)
	clojure.core/apply (core.clj:652)
	shadow.cljs.devtools.cli/do-clj-run/body-fn--15420--auto----16265 (cli.clj:127)
	shadow.cljs.devtools.cli/do-clj-run (cli.clj:126)
	shadow.cljs.devtools.cli/do-clj-run (cli.clj:84)
	shadow.cljs.devtools.cli/blocking-action (cli.clj:145)
	shadow.cljs.devtools.cli/blocking-action (cli.clj:135)
	shadow.cljs.devtools.cli/main (cli.clj:196)
	shadow.cljs.devtools.cli/main (cli.clj:151)
	clojure.core/apply (core.clj:661)
	clojure.core/apply (core.clj:652)
	shadow.cljs.devtools.cli/-main (cli.clj:238)
	shadow.cljs.devtools.cli/-main (cli.clj:236)
	clojure.lang.Var.applyTo (Var.java:702)
	clojure.core/apply (core.clj:657)
	clojure.main/main-opt (main.clj:317)
	clojure.main/main-opt (main.clj:313)
	clojure.main/main (main.clj:424)
	clojure.main/main (main.clj:387)
	clojure.lang.Var.applyTo (Var.java:702)
	clojure.main.main (main.java:37)

priornix18:10:28

(ns demo.build
  (:require
    [shadow.cljs.devtools.api :as shadow]
    [clojure.java.shell :refer (sh)]))

(defn dev []
  {:shadow/requires-server true}
  (sh "ls" "-l")
  (shadow/watch :app))

priornix18:10:47

Calling this from CLI: shadow-cljs clj-run demo.build/dev

priornix19:10:30

Ah, okay, I have to run shadow-cljs server first

thheller19:10:48

no you don't need to run server first

thheller19:10:53

thats what the meta is for

thheller19:10:01

you just placed the meta in the wrong place

priornix19:10:03

Well, it doesn't work though 😞

thheller19:10:06

(defn dev []
  {:shadow/requires-server true}
  (sh "ls" "-l")
  (shadow/watch :app))

priornix19:10:09

I have to run server before it works

thheller19:10:10

before the [] not after

priornix19:10:20

Apologies 🙂

thheller19:10:33

or (defn ^:shadow/requires-server dev [] ...)

priornix19:10:39

Think the latter syntax is clearer

priornix19:10:44

At least for me 🙂

thheller19:10:12

I prefer the map

priornix19:10:13

Anyway, thanks

priornix19:10:30

Also a slight clarification in your document might be useful

priornix19:10:44

I tried to create a .cljs instead of a .clj file

priornix19:10:22

So a slight tip in your document might be useful

priornix19:10:13

I can create a pull request for this

priornix19:10:00

But where's your asciidoc files stored at?