This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-20
Channels
- # beginners (7)
- # boot (39)
- # braid-chat (3)
- # braveandtrue (1)
- # cider (27)
- # cljsjs (15)
- # cljsrn (6)
- # clojars (18)
- # clojure (307)
- # clojure-art (1)
- # clojure-brasil (1)
- # clojure-italy (2)
- # clojure-poland (3)
- # clojure-russia (61)
- # clojure-sdn (2)
- # clojure-taiwan (4)
- # clojure-uk (5)
- # clojurebridge (7)
- # clojurescript (19)
- # core-async (1)
- # core-matrix (1)
- # cursive (35)
- # datomic (3)
- # emacs (51)
- # euroclojure (3)
- # hoplon (20)
- # jobs (1)
- # keechma (1)
- # mount (3)
- # off-topic (2)
- # om (177)
- # onyx (96)
- # parinfer (4)
- # pedestal (4)
- # re-frame (19)
- # reagent (7)
- # untangled (5)
@onetom: Thanks! I’m glad it’s working out for you. boot support is below a few other things in the priority list, but I’ll get there sometime soon.
I don't understand pod/with-call-in
mostly because pod/with-eval-in
works, with a require added, but the pod/with-call-in
gives an unexpected exception.
(println
(pod/with-call-in p
:foobar))
Gives java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException: nth not supported on this type: Keyword
"Given a pod and an expr of the form (f & args),"
keyword is not a such expression
@dominicm: it's doing something like (first :foobar)
because it's expecting a list as the function/args argument
(pod/with-call-in p (+ 1 2))
is how it's used
(pod/with-call-in p
(rhizome.viz/graph->image
[:a :b :c] {:a [:b :c]
:b [:c]
:c [:a]}
:node->descriptor (fn [n] {:label n})))
and my exception: clojure.lang.ExceptionInfo: java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.IFn
I understand now why the small example was failing, but not so much why my new one is.There are warnings I get when doing boot replc -c
such as
boot.user=> (start-repl)
WARNING: Unknown option ':compiler-env'.
WARNING: Unknown option ':init'. Did you mean ':main'?
WARNING: Unknown option ':bind-err'.
WARNING: Unknown option ':quit-prompt’
If I understand correctly it is interacting with boot.repl task and passing some options which are not there anymore in recent CLJS versions
That is an issue with ClojureScript, not Boot. ClojureScript’s latest version now warns when passed unknown options. Previously it just ignored them. A lot of tooling out there has gotten away with passing old options for ages without warnings.
(i.e., those options are harmless and were ignored before; they’re still "ignored" but now you get told about them)
It’ll depend on the 3rd party tooling you’re using.
I’m not familiar with replc
— which library provides that?
And start-repl
?
And is the project you’re working with generated from a template? That’s the other place old options may come from?
(so they might be in your build.boot
file)
Nah it is not from made from template, I went on with Modern CLJS tutorial and got something like this:
(set-env!
:source-paths #{"src/cljs"}
:resource-paths #{"html"}
:dependencies '[[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.8.34"]
[adzerk/boot-cljs "1.7.228-1"]
[adzerk/boot-reload "0.4.2"]
[adzerk/boot-cljs-repl "0.3.0"]
[com.cemerick/piggieback "0.2.1" :scope "test"]
[weasel "0.7.0" :scope "test"]
[org.clojure/tools.nrepl "0.2.11" :scope "test"]
[pandeiro/boot-http "0.7.0"]])
;; Expose tasks to boot command
(require '[adzerk.boot-cljs :refer [cljs]]
'[adzerk.boot-reload :refer [reload]]
'[adzerk.boot-cljs-repl :refer [cljs-repl start-repl]]
'[pandeiro.boot-http :refer [serve]])
Looks like those options are from Piggieback (https://github.com/cemerick/piggieback/blob/master/src/cemerick/piggieback.clj#L169) and possiblt the options are valid for REPL
Thanks @juhoteperi — So if there isn’t already an issue opened against Piggieback, that’s probably the thing to do, so Piggieback gets updated for the latest cljs.
The problem is with Cljs, not Piggieback
Gotcha… So I was right first time! "That is an issue with ClojureScript, not Boot. ClojureScript’s latest version now warns when passed unknown options. Previously it just ignored them." but I had incorrectly assumed they were actually bad options rather than passthru options. Thanks for the clarification.
It’s been a while since I tried to do anything with cljs — and that space has moved so fast over the last year!
The new Clojurescript 1.8.34 has introduced warnings for compiler options, but I don't think they are properly done yet (I saw quickly discussing it on #C07UQ678E)