Fork me on GitHub
#boot
<
2016-03-20
>
cfleming00:03:37

@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.

dominicm10:03:09

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.

dominicm10:03:17

(println
          (pod/with-call-in p
            :foobar))
Gives java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException: nth not supported on this type: Keyword

juhoteperi10:03:45

"Given a pod and an expr of the form (f & args),"

juhoteperi10:03:59

keyword is not a such expression

dominicm10:03:23

Oh, I see. So it's not just a plain ol' evaluate.

dominicm10:03:56

Perhaps the fn I'm trying to call isn't a fn.

alandipert10:03:00

@dominicm: it's doing something like (first :foobar) because it's expecting a list as the function/args argument

alandipert10:03:53

(pod/with-call-in p (+ 1 2)) is how it's used

dominicm10:03:35

(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.

dominicm10:03:10

Maybe it's the anonymous function

dominicm10:03:21

Yes it is! aha!

dominicm11:03:51

annd.. the next confusion

dominicm11:03:47

yeah, so now it's upset about the passed in anonymous function.

dominicm11:03:57

I'm not sure how to solve that.

dominicm11:03:43

I need some way to make an anonymous function printable. Hmm..

dominicm11:03:44

I just realized that it's better to just shift everything into it's own ns. duh.

zilvinasu21:03:24

Hey, is boot supposed to be working with recent CLJS versions ?

zilvinasu21:03:52

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’

zilvinasu21:03:26

If I understand correctly it is interacting with boot.repl task and passing some options which are not there anymore in recent CLJS versions

seancorfield21:03:17

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.

seancorfield21:03:49

(i.e., those options are harmless and were ignored before; they’re still "ignored" but now you get told about them)

zilvinasu21:03:10

Hmm is there some easy way to ignore them ?

seancorfield21:03:59

It’ll depend on the 3rd party tooling you’re using.

seancorfield21:03:33

I’m not familiar with replc — which library provides that?

zilvinasu21:03:02

Sorry, it was a typo, actually it is boot repl -c

seancorfield21:03:32

And start-repl?

zilvinasu21:03:45

boot-cljs-repl

seancorfield21:03:12

And is the project you’re working with generated from a template? That’s the other place old options may come from?

seancorfield21:03:25

(so they might be in your build.boot file)

zilvinasu21:03:02

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]])

juhoteperi21:03:45

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

seancorfield21:03:09

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.

juhoteperi21:03:22

The problem is with Cljs, not Piggieback

seancorfield22:03:02

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.

seancorfield22:03:50

It’s been a while since I tried to do anything with cljs — and that space has moved so fast over the last year!

richiardiandrea22:03:40

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)