Fork me on GitHub
#boot
<
2015-10-11
>
podviaznikov02:10:06

hi @alandipert, I saw inject task you created(https://github.com/tailrecursion/hoplon.io/blob/master/build.boot#L40). Maybe you can extract it into separate library? This way it can be used from perun too. I think it would be pretty useful. Just an idea

lukemorton11:10:24

Adding the following to my boot-reloaded app causes an error:

(let [history (History.)]
  (events/listen history EventType.NAVIGATE
    (fn [e] (js/console.log "hmm"))))

lukemorton11:10:39

Error being: Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened.

lukemorton11:10:20

Okay it's initialising History object that does it 😕

malcolmsparks13:10:11

@martinklepsch: thanks for the pointers - I'm a bit confused where I should put -vvv, it's the boot repl -c then (start-repl) which is causing me that error, not the running the server repl.

malcolmsparks13:10:05

@martinklepsch: ah, actually I've found it thanks to your comment - you're right, boot show -d showed me kioo was bringing in its own piggyback - thanks so much for your help, that makes complete sense

malcolmsparks13:10:42

I'm guess that running things in a pod doesn't exclude the system deps that are coming in (because that's how java classloaders work), so you have to be careful in your build.boot deps list

malcolmsparks13:10:43

one remaining question I have is whether there's a boot equivalent of lein's exclusions feature

malcolmsparks13:10:01

that way, I can bring in kioo but exclude its piggyback dependency

micha14:10:22

@malcolmsparks: boot's :dependencies syntax is the same as leiningens' -- you can do [kioo "1.2.3" :exclusions [com.cemerick/piggyback]]

micha14:10:58

there is also a global :exclusions key in the env that will apply this to all dependencies

micha14:10:40

(set-env!
  :exclusions '[com.emerick/piggyback]
  ...

martinklepsch15:10:53

@malcolmsparks: Pods help isolating dependencies. If you look at the sources of the cljs-repl task a new pod (=isolated clojure runtime) is created with all required dependencies. If the user however decides to pin one of these deps themselves they are used as specified by the user. (https://github.com/adzerk-oss/boot-cljs-repl/blob/master/src/adzerk/boot_cljs_repl.clj#L18)

martinklepsch15:10:01

In the case of kioo I think its cljx that brings in piggieback. I’ve previously had confusing experiences with leiningen’s scoping of development dependencies but can’t find a related ticket right now.

martinklepsch16:10:00

@malcolmsparks: would be interesting to see the output of boot show -d for your project

martinklepsch17:10:29

@malcolmsparks: oh and re -vvv that’s an option to boot itself so just pass it like boot -vvv repl -c (means verbose level 3 which is maximum iirc)

martinklepsch18:10:06

@micha: what caused the container to be gone before removal was triggered?

micha18:10:32

it manages the dom

micha18:10:33

it's not safe to treat the dom as a globally shared mutable bucket

micha18:10:28

i'd prefer to have a more modular architecture, really

micha18:10:50

where boot-reload fires dom events that various things can listen for

micha18:10:58

and not mess around in the dom itself

micha18:10:30

events i think are the correct way for reload to communicate with the application

micha18:10:52

they were designed specifically for that purpose

micha18:10:01

with the guard in there it works fine though

martinklepsch18:10:00

I’m starting to think it would make sense to completely split the client side code from the backend and just provide an api via websockets that can be used to show warnings/errors etc

micha18:10:43

yeah that could be a thing

micha18:10:59

you'd have 2 tasks, the server and client

micha18:10:09

i like it

micha18:10:49

separating the server part could be cool for when you're not making a webapp, too

micha18:10:02

maybe to run tests remotely or something

micha20:10:18

the recent boot-reload improvements are pretty awesome