Fork me on GitHub
#boot
<
2017-04-12
>
qqq01:04:31

how do I launch a socket-repl from boot ?

qqq03:04:36

@richiardiandrea was unaware of socket-server task, thanks!

richiardiandrea03:04:06

that's not been merged iirc, but there is another way above to start it with boot

qqq03:04:34

I'd prefer a task to command line options

qqq03:04:40

I'll manually copy the code in for the task if necesary

qqq03:04:43

Is there a way to tell boot to reload (without restarting a jvm) whenever build.boot changes ?

richiardiandrea03:04:47

Not yet merged yeah

qqq04:04:29

can one of you here (1) merge it, (2) push an official release, and (3) push it to clojars in the next 15 mins? 🙂

qqq04:04:10

How can

(defn poll [task]
  (let [f (java.io.File. "build.boot")]
    (loop [mtime (.lastModified f)]
      (let [new-mtime (.lastModified f)]
        (when (> new-mtime mtime)
          (load-file "build.boot")
          (boot (task)))
        (Thread/sleep 1000)
        (recur new-mtime)))))
work with watch ?

qqq04:04:24

if the (task) involves a (watch), won't the (boot (task)) never return ... this negating the whole auto reloader ?

timovanderkamp13:04:42

Hi, how can i fix the CompilerException im getting from using the js tag in .cljc files. java.lang.RuntimeException: No reader function for tag js, compiling:

miikka13:04:25

Are you using #js outside of a reader conditional? i.e. #?(:cljs ...)?

timovanderkamp13:04:24

Ye but that didnt seem the be an issue when using leiningen

mitchelkuijpers13:04:18

@miikka om.next adds a reader for #js

miikka13:04:33

Yeah, you can do that and then it works outside reader conditionals

mitchelkuijpers13:04:49

Except that it does not work for some reason in boot

juhoteperi13:04:47

I guess because Boot-cljs runs Cljs compiler in a pod and Boot doesn't correctly load data_readers for pods

juhoteperi13:04:19

Perhaps Boot-cljs should call clojure.core/load-data-readers when the pod is initialized

juhoteperi13:04:07

@timovanderkamp Do you have example cljc code which causes this problem?

miikka13:04:51

I assume this issue might be still relevant: https://github.com/boot-clj/boot/issues/47

juhoteperi13:04:51

@miikka I think that issue was about repl session, that and was fixed

timovanderkamp13:04:50

(dom/div #js {:class "list-items"} ) this fails, and (dom/div #?(:cljs #js {:class "list-items"} :clj {:class "list-items"})) works fine

juhoteperi14:04:05

And what om dependency should I use?

miikka14:04:41

oh okay, I'm just confused today

juhoteperi14:04:01

This also requires loading the cljc namespace as macro namespace

timovanderkamp14:04:06

[org.omcljs/om "1.0.0-alpha47" :exclusions [org.javassist/javassist]]

juhoteperi14:04:09

else Cljs compiler won't evaluate the namespace as Clj

juhoteperi14:04:42

Hmm or something... I still can't reproduce this

timovanderkamp14:04:07

(dom/div #js {:class "list-items"} ) works in the clojure repl for me

mitchelkuijpers14:04:11

Which boot version are you trying it on @juhoteperi

juhoteperi14:04:53

@timovanderkamp Which Boot and Boot-cljs versions do you have?

juhoteperi14:04:27

Try upgrading to 2.7.1

timovanderkamp14:04:06

trying it out now

timovanderkamp14:04:49

Nope, didnt work out

juhoteperi14:04:04

I wonder what difference I have in my test project

timovanderkamp14:04:25

My Boot-cljs version is "1.7.228-2"

miikka14:04:45

What if you try to use common.hello from Clojure?

miikka14:04:30

right, saapas does that anyway

juhoteperi14:04:22

@timovanderkamp Can you provide full stack trace for this error?

timovanderkamp14:04:57

Your changes seem to match my project

timovanderkamp14:04:26

`Error reloading: atlas-crm.shared.issue-panel clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: No reader function for tag js, compiling:(atlas_crm/shared/issue_panel.cljc:69:44)Adding :require adzerk.boot-reload.init50021 to main.cljs.edn... Adding :require adzerk.boot-cljs-repl to main.cljs.edn... Compiling {less}... 14 changed files. Compiling ClojureScript... • public/js/main.js` This is all im getting when adding the js tag

juhoteperi14:04:06

Hmm where is that "Error reloading: " message coming from

juhoteperi14:04:47

I don't think boot-cljs such message

mitchelkuijpers14:04:57

maybe it is danielsz/system

raywillig20:04:44

hi can someone help me figure out the right way to declare the :add-jar task options in my build.boot file? i get the following error:

option :add-jar must be of type {sym regex}

micha20:04:19

@raywillig you'd do like (sift :add-jar {org.clojure/clojure #".*"})

micha20:04:45

that will add the entries from the jar associated with the org.clojure./clojure dependency to the fileset

micha20:04:55

and the regex can be used to filter those entries by path

raywillig20:04:04

@micha oh ok. I don’t need to mention the version cuz it’s coming from the deps?

micha20:04:07

the {k v} notation indicates a map whose keys are of type k and whose values are of type v

micha20:04:25

in this case keys are symbols and values are regex patterns

raywillig20:04:10

thanks @micha, got that working

micha20:04:20

sweet 👍

raywillig20:04:41

@micha is it possible with sift :move to use parentheses in the regex to wildcard output?

micha21:04:17

and $1 etc in the replacement string

raywillig21:04:21

awesome. thanks