This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-11
Channels
- # beginners (109)
- # boot (61)
- # cider (8)
- # clara (3)
- # cljs-dev (67)
- # cljsrn (5)
- # clojure (96)
- # clojure-argentina (1)
- # clojure-brasil (2)
- # clojure-greece (10)
- # clojure-russia (114)
- # clojure-spec (51)
- # clojure-uk (45)
- # clojurebridge (2)
- # clojurescript (139)
- # cursive (18)
- # data-science (1)
- # datascript (2)
- # datomic (13)
- # dirac (2)
- # emacs (5)
- # events (1)
- # javascript (2)
- # jobs (1)
- # juxt (3)
- # off-topic (62)
- # om (10)
- # onyx (12)
- # perun (7)
- # ring-swagger (7)
- # specter (21)
- # test-check (5)
- # untangled (16)
- # utah-clojurians (1)
- # yada (2)
hmmm.. actually on the second attempt trick with using future
worked. but right at the beginning it throws java.lang.NullPointerException
in cljs console
can I use wait
to solve that? I’m trying but keep hitting this error
Can't change/establish root binding of: *cljs-repl-env* with set
@ag https://github.com/adzerk-oss/boot-cljs-repl#build says that you need to run the start-repl
task before the cljs
task. The order that things happen depends on code because tasks generate middleware (that can execute code before or after later tasks) but sometimes it only works in certain order.
We have a task that compiles three Java files. The task looks more or less like this:
(deftask dev []
(comp (javac)
(start-system)
(repl))
The output I see is this:
Compiling 3 Java source files...
followed by a REPL, like expected. I can use the three classes from the REPL without problems.
Then after a while this appears randomly when I’m working in the REPL: https://www.dropbox.com/s/dq7u6wuiu7d1nsu/Screenshot%202016-11-11%2012.27.37.png?dl=0Has anyone seen public key security exceptions when downloading jars from maven central? Had a working system, had upgraded maven, then reverted. I'm not sure if that was the issue though. It would seem I don't have a certificate installed to download from maven central, but I never had installed one before when it was working. Here's the exception when trying to re-install boot after wiping out the ~/cache/.boot/ btw this is on windows 7.
@symbit: did you try maybe clearing out your m2 folder?
@flyboarder I haven't. It seems the more I unwind things the worse it gets. Will move it aside.
@micha @alandipert re: possibly integrating the virgil code so it's usable from boot. A few weeks ago I was mucking around with this, and actually made a javac*
task that does exactly the integration of the current javac
task with the dynamic class compiling present in virgil
. Is that something that would be useful to include as a built-in? I don't have the code on github ATM, but I can put that up later at the very least as a proof of concept
I was messing around with it because my junit
task wasn't able to pick up changes to the classes when run inside a watch. I was able to get it working with my new compile task. Not sure how much more would be needed for good integration with the repl
@flyboarder renaming .m2 and creating a new .m2 with a settings.xml from a colleague, gives the same Exception.
@flyboarder creating a pom.xml and running mvn verify starts downloading all deps with no issue.
@mynomoto so I am still failing to get cljs-repl in one task:
(deftask try-me []
(comp
(dev-env)
(serve :reload true)
(watch)
(reload :on-jsload)
(notify)
(npm-install)
(sassc)
(cljs-repl)
(start-repl)
(cljs)
(target)
))
Not workingI'm not sure but I thought start-repl
(to start a CLJS REPL) came after you had connected to the initial (clojure) REPL
ok, I’m starting repl boot repl
then (boot (try-me))
it still complains:
Can't change/establish root binding of: *cljs-repl-env* with set
> cljs-repl
is the task to be used in the task pipeline whereas start-repl
is how you connect to the ClojureScript REPL once you're in a Clojure REPL.
I would also try to simplify your task definition. That try-me
task is doing a lot of things. Try and get it working with just starting a repl first and then add things gradually
@geoffs I am trying to find a way to start cljs repl in a single task - in one command, without human being to have to wait until cljs-compilation, and then to type (start-repl)
or whatever he/she needs to type in order to get cljs-repl
ah. that, I know nothing about. You could try using the nrepl startup hooks though. I haven't had great success with running things that way in the past, but it might be closer to what you want
So, the goal is: to make cider-jack-in-clojurescript
to open 2 repls: clj and cljs. Well I can do it now, It creates 2 repls, it even starts cljs compilation in cljs-repl buffer, but you still have to manually type (start-repl)
when it’s done compiling… duh
I know there was supposed to be a mechanism through which one specified forms to be evaluated when a REPL was created
You put it in the project map. I thought I had an example of doing it in boot, but I'm coming up blank
Ah now I remember, I think it was :init-ns
that wasn't working properly for me due to some issue involving cider and boot
@ag poking around in this namespace might help you understand how to get code to run in a repl after it's started. https://github.com/boot-clj/boot/blob/master/boot/pod/src/boot/repl.clj
You could also write a tiny custom nrepl middleware, because boot already has hooks for adding nrepl middlewares. Otherwise, right off the bat I'm not seeing the thing I think you need.
so this (cljs :compiler-options {:watch-fn (fn [] (prn “done”))})
results in a error: java.lang.RuntimeException: No reader function for tag object
one thing i'm not clear on is the relationship with reloading clojure namespaces and otherwise messing with the environment
me neither. I was focused more on using boot for building java projects, so I didn't really get into the intricacies of interoperating with clojure.
@ag, this is just a hunch, but if cljs
is trying to pass that function into a pod, then it won't work with an anonymous function like that because they can't be printed and then read back in. maybe just defining that function in your project and just passing the name in :compiler-options
would work?
@geoffs i don't think the idea would be ready for a builtin just yet, but a library would be absolutely awesome
@geoffs i would definitely try it out. then after we had some experience, we could investigate rolling it into boot or adding an option to javac
task
Hi guys, I’m having a moment of serious confusion here;; a dependency for my project lists [cljsjs/boot-cljsjs]
, and internally that project uses clj-http
. However, for some unrelated reason I had clj-http listed as my own dependency, albiet a different version. Now I no longer need clj-http for my own project, but if I remove that dependency, my boot task fails with a bunch of strange errors Call to clojure.core/defn- did not conform to spec:
, where the root seems to be here:
clj-http.client/eval74/loading--auto-- client.clj: 1
clj-http.client/eval74/invokeStatic client.clj: 1
clj-http.client/eval74 client.clj: 1
...
boot.pod/call-in* pod.clj: 382
cljsjs.boot-cljsjs.packaging/eval2077/fn/G/fn packaging.clj: 88
boot.task.built-in/fn/fn/fn/fn built_in.clj: 493
i.e. boot-cljsjs is using clj-http, but way downstream it has to do with potemkin and finally clojure.spec which is causing the strange errors.
Is there some hidden dependency I don’t know about with cljsjs? is there an issue resolving the proper dependency? is there something wrong with my maven cache?
*also I’ve been using boot show -d to list out my dependencies, but no where is clj-http listed… which makes things even more confusing