Fork me on GitHub
#boot
<
2017-03-15
>
ag00:03:50

how do I run two separate (unrelated) tasks in sequence? e.g. compile cljs, run server and only after that test-clj

micha01:03:52

@ag you can use clojure.core/comp

sineer06:03:57

Wouldn't it be nice if boot could download multiple dependencies at once? My CI builds don't cache the packages and boot is slow downloading deps... Just a thought ๐Ÿ™‚

dominicm11:03:14

@sineer I have a feeling that would to be implemented at the aether level

dominicm11:03:21

or pomegranite

micha12:03:12

i think aether already does that to some extent

micha12:03:37

not definite but the log messages seem to look that way

micha12:03:33

i wonder if there is some configuration in aether for that

juhoteperi13:03:39

Boot/Pomegranate also uses very old Sonatype-Aether (latest release 2011) instead of Eclipse-Aether or Maven-resolver

juhoteperi13:03:03

Maven has used Eclipse Aether since 3.1 and the next version will use Maven-resolver: http://maven.apache.org/aether.html

richiardiandrea14:03:18

Btw I patched pomegranate to use new stuff, but I need some support to the PR I guess ๐Ÿ˜€ it has not been reviewed yet

kentnl19:03:46

I've been fighting with boot credentials for the last day, seemingly none of the documented instructions on the wiki work anymore ๐Ÿ˜• ( I've released ~4 things to clojars already, without any issues, but suddenly something is different and defying explanation )

kentnl19:03:05

( makes the maven repos' fall out of the repolist, and it can no longer resolve clojure ! )

kentnl19:03:31

Apparently, clojars isn't even receiving my username

kentnl19:03:37

even if I explicitly pass it to push

kentnl19:03:53

(there's something else funky going on, because even when I rewrite the entirtey of push into build.boot just to sniff the repo-map values, my ~/boot/profile.boot stuff doesn't turn up there either, as if configure-repositories! was silently being ignored )

kentnl19:03:47

And all the code in between is far too complex to make sense of.

kentnl19:03:20

https://github.com/irresponsible/tentacles/blob/master/build.boot # if anyone can spot anything obvious, that'd be great, because I can't see any glaring differences between this and anything else I've published

kentnl19:03:49

but despite this, they all worked effortlessly, and this is a 2 day death march.

kentnl19:03:50

as a side note, if there's any magic to make stacktraces from boot usable for anything, that'd be great. Because "oh, some line number in some file that doesn't exist in /tmp/" is really unhelpful, especially when that line number coincides with nothing in any file I've written.

micha19:03:47

@kentnl you can add the -b option to boot

micha19:03:00

use it with the command line you used when you got the exception

micha19:03:13

like for instance if i did boot foo -x bar -y

micha19:03:24

i could do boot -b foo -x bar -y

micha19:03:41

or boot -b foo -x bar -y |cat -n

micha19:03:46

and see the line numbers

kentnl19:03:26

that's helpful-ish I guess. Folding out all the whitespace of course means the granularity of those line numbers will be less helpful ๐Ÿ˜•

micha19:03:40

you can use -v boot option to not fold the whitespace

micha19:03:59

but you want to also use -v when you generate the stacktrace of course

micha19:03:05

so the line numbers still match up

micha19:03:09

does that make sense?

kentnl19:03:14

yep. Thanks ๐Ÿ™‚

micha19:03:45

i can have a look in a few

micha19:03:00

currently in a meeting ๐Ÿ™‚

kentnl19:03:53

meeting can't be too fun then ๐Ÿ˜„

ag20:03:16

hey guys, I still canโ€™t figure out how to solve this thing: basically, I have a task that compiles clojurescript and runs a jetty server. I have another task that runs bunch of selenium tests that need to open the webpage and do bunch of things, and I can't figure this out. Either I can't get the cljs compilation and server or server is running, but when you open the page it can't find any resources (no css, no js files), I can't figure out how to correctly compose two tasks either: it either throws null exception or does some other flaky stuff. Can someone show me an example or help me to get this to work. Any help would be much appreciated.

ag20:03:10

and then when it everything looks fine it throws some mysterious exception yelling at Unable to resolve symbol: will-mount in this context

ag21:03:23

I think my fundamental problem is that I still canโ€™t figure out how to run tasks sequentially task b should only execute after a is done with its own shit

qqq21:03:10

(comp
  (watch)
  (task a)
  (task b))

richiardiandrea21:03:27

@ag tasks are executed sequentially always, and unless the task contains a future this is always true

richiardiandrea21:03:49

given the nature of the thing you are trying to do

richiardiandrea21:03:03

it seems like you need to come up with a way to coordinate

ag21:03:54

so this, does not work as I wanted:

(deftask a []
  (comp
    (serve)
    (cljs)))

(deftask b []
  (prn "b")
  (Thread/sleep 2000))

(deftask run []
  (comp
    (watch)
    (a)
    (b)))

ag21:03:27

@richiardiandrea any way to get it to work?

ag21:03:31

ยฏ\(ใƒ„)/ยฏ

richiardiandrea21:03:49

b in this case prints and sleeps immediately, because remember, you are returning middleware there

richiardiandrea21:03:14

if you want to trigger the body on task execution you need to wrap it with with-pass-thru

qqq21:03:30

I wonder if boot would be more 'dev friendly' if instead of (comp (serve) (cljs)) the fact that (serve) and (cljs) return functions that take-in/return filesets were made ezplicit

richiardiandrea21:03:46

it is the nature of middleware, pretty opaque from the outside, but composition looks pretty easy

ag23:03:52

anyone used spyscope with boot? why do I get No reader function for tag spy/p how do I properly set data readers?

ag23:03:22

when should I call load-data-readers!? Should I require spyscope in build.boot or profile.boot? neither seem to be working

micha23:03:59

you want to call load-data-readers! after adding dependencies

micha23:03:24

cause the special file with the tagged literal mappings in the spyscope jar needs to be on the classpath

ag23:03:02

I did this and it still not working ;( It frustrated my colleague, now he wants to move back to lein