This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-14
Channels
- # beginners (33)
- # boot (38)
- # clara (21)
- # cljs-dev (1)
- # cljsjs (2)
- # cljsrn (12)
- # clojure (230)
- # clojure-argentina (1)
- # clojure-brasil (3)
- # clojure-dusseldorf (4)
- # clojure-france (9)
- # clojure-italy (1)
- # clojure-russia (123)
- # clojure-spec (46)
- # clojure-turkiye (1)
- # clojure-uk (60)
- # clojurescript (83)
- # core-async (6)
- # cursive (10)
- # datascript (19)
- # datomic (28)
- # defnpodcast (1)
- # emacs (7)
- # figwheel (7)
- # fulcro (29)
- # leiningen (29)
- # lumo (9)
- # off-topic (14)
- # om (1)
- # onyx (25)
- # pedestal (1)
- # protorepl (3)
- # re-frame (10)
- # reagent (41)
- # ring-swagger (11)
- # shadow-cljs (10)
- # testing (5)
- # unrepl (3)
- # vim (3)
Hi. I’m thinking of writing some CLI tools in clojurescript targeting node.js. That seems very possible and I have a couple of examples at hand (clack, closh, ..). I don’t have any example using boot as build tool though. Anyone aware of a nice cli tool project using boot targeting node.js?
Has anyone encountered Boot pulling in the wrong version of tools.namespace?
Classpath conflict: org.clojure/tools.namespace version 0.2.11 already loaded, ALSO loading version 0.3.0-alpha4
I have an explicit dependency on 0.3.0-alpha4 in my :dependencies
, and have excluded tools.namespace everywhere it's required but I'm still somehow getting the older version, which messes up compiling Clojurescript in my project.It's coming from my profile.boot
. Commenting everything out in there fixes things. Also the warning doesn't show up during CI.
I guess boot show -d
ignores some of what's in profile.boot
.
@sundbp If you find a good example, I also would like to know. Most things I’ve seen use lein + figwheel for node
@sundbp There’s this though: https://github.com/boot-clj/boot-figreload
You can also start without the reloading. I guess the reloading is only useful when you have some long running process in your node process, like a webserver?
I have a setup like this: cljs compiles node, Gulpfile watches js, re-runs node which produces some html
so I don’t use a REPL there, the node process terminates too fast for a REPL to make sense
ok. well, I really just want a good REPL experience to iterate on some node based cli tools..
the tool would terminate fast when running independently, but a REPL with the tool’s namespaces available can run forever.
it’s not like my clojure REPLs are running the exact same thing as the prod version would. it’s just a REPL that loads some NS and from there executes code as per the repl. I’m looking for the same for node
I see how it works now, having tried https://github.com/malyn/figwheel-node-template - very cool
@sundbp Can I PM my code to you somewhere? Don’t want to flood this channel and I don’t have it on Github
sure. i’m on <mailto:[email protected]|[email protected]>, but you can laso just PM me here on slack.
@hlolli depending on what you're trying to do, you could just omit the target
task so that the directory doesn't get written?
I want it to be written, I see that some functions in a task are called ahead of the tasks, it's just about timeing, because I want to find out if a file exists within these directories during compilation to prevent conflicts.
hlolli (with-pass-thru _ (dosh "mkdir", "-p", "target")) is a little anonymous task that will do it. just put in pipeline
maybe add another dosh
call that does an rm
ok ok thanks, I wanted to know if it already existed before doing it, like lein clean.
when I run boot remote-client-dev
, I get:
Writing adzerk/boot_reload.cljs to connect to ...
Writing main.cljs.edn...
Compiling ClojureScript...
• main.js
Compile sources, elapsed time: 4899.99279 msecs
Compile sources, elapsed time: 33.606849 msecs
java.lang.Thread.run Thread.java: 748
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 624
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1149
java.util.concurrent.FutureTask.run FutureTask.java: 266
...
clojure.core/binding-conveyor-fn/fn core.clj: 2027
adzerk.boot-cljs/compile-1/fn boot_cljs.clj: 160
adzerk.boot-cljs/compile boot_cljs.clj: 72
boot.pod/call-in* pod.clj: 413
...
org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke ClojureRuntimeShimImpl.java: 102
org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke ClojureRuntimeShimImpl.java: 109
...
boot.pod/call-in* pod.clj: 410
boot.pod/eval-fn-call pod.clj: 359
clojure.core/apply core.clj: 657
...
adzerk.boot-cljs.impl/compile-cljs impl.clj: 156
adzerk.boot-cljs.impl/dep-order impl.clj: 36
adzerk.boot-cljs.impl/cljs-depdendency-graph impl.clj: 29
clojure.core/reduce core.clj: 6753
clojure.core.protocols/fn/G protocols.clj: 13
clojure.core.protocols/fn protocols.clj: 75
clojure.core.protocols/iter-reduce protocols.clj: 49
adzerk.boot-cljs.impl/cljs-depdendency-graph/fn impl.clj: 30
adzerk.boot-cljs.impl/ns-dependencies impl.clj: 23
cljs.analyzer.api/find-ns api.cljc: 163
java.lang.AssertionError: Assert failed: (symbol? sym)
Elapsed time: 13.816 sec
is there anyway to get more info on "where exactly is this assertion happening" if it's due to my code (I suspect not) -- and if it's due to cljs/boot internal code, is it possible to get the name of the namespace it was processing when this happened ?
as of right now, I have no where the error is coming from