Fork me on GitHub
#boot
<
2016-11-14
>
pseud07:11:42

in boot.user, calling (foo), where foo is a task defined with deftask returns a function. But ((foo)) will fail, complaining that more than zero arguments are needed.. How can I invoke a task from boot.user ?

pseud07:11:44

Ah, wonderful 🙂

Tim07:11:10

is there a way to add a directory to the fileset instead of a plain file?

pesterhazy10:11:58

With a cljs edn located at dashboard/resources/public/js/dashboard.cljs.edn, boot-reload tries to reload a path that includes /public. However, I want to serve my /public classpath as /, not /public (as I do in production).

pesterhazy10:11:41

I've tried to come up with the right value for :cljs-asset-path for boot-reload, but no luck so far.

pesterhazy10:11:12

N.b. the problem only occurs in reloading; the first devenv load works.

pesterhazy11:11:30

I've rephrased my question as a GitHub issue 🙂

micha15:11:35

@tmtwd you can only add directories to the fileset, there isn't a way to really add individual files

Tim15:11:31

@micha but can you name these directories? or is it always going to be tmp-dir!?

micha16:11:10

@tmtwd the directory you add to the fileset is like the root of the fileset

micha16:11:17

so it has no name

micha16:11:28

you can have subdirectories of course

micha16:11:30

with names

Tim16:11:42

oh ok, that’s what I think I want then

Tim16:11:55

how do you add a subdirectory to tmp-dir!?

micha16:11:24

well the fileset only knows about files

micha16:11:41

so if you want a subdirectory you'd do like you do with git

micha16:11:51

make a foo/.empty file or something

micha16:11:13

the fileset doesn't know anything about directories, just like git

Tim16:11:25

ah I see interesting

micha16:11:54

it does prevent you from doing things like making a file named foo/bar and then another file named foo/bar/baz

micha16:11:12

but other than that the slashes are just characters

Tim16:11:16

so I could do

(deftask add-version-txt []
  (with-pre-wrap fs
    (let [t (tmp-dir!)]
      (spit ( t “foo/version.txt") version)
      (-> fs (add-resource t) commit!))))

Tim16:11:29

and that’ll make a subdirectory called foo

micha16:11:55

i recommend using the variadic form like (io/file t "foo" "version.txt")

micha16:11:05

that way it will work on windows too

Tim16:11:16

ok perfect

Tim16:11:18

will do that

samedhi17:11:51

I would like to get https://github.com/crisptrutski/boot-cljs-test to throw an exception in the event that an error occurs. I would like this so that I can short circuit running my really slow test if my medium speed test fail. Sort of illustrated the idea here.

crisptrutski17:11:58

Hey samedhi - probably the simplest would be to break it up into two test suites

samedhi17:11:26

Shit, just realized I posted wrong link above.

levitanong17:11:37

@micha sorry to bother, took a look at the jgit stuff, and unfortunately clj-jgit doesn’t implement push, so I have to work directly with jgit. Thing is, I use ssh authentication, so it seems I need to use with-identity, but I’m at a loss for how to reference my private and public keys. slurping the path doesn’t seem to work—I’m guessing this is a filesystem path vs classpath thing. Any tips?

crisptrutski17:11:46

And throw after first - just working on a new version out at the moment actually

samedhi17:11:50

@crisptrutski Conceptually, I think that is where I was going. But how can I know when the result is failing?

samedhi17:11:40

I see that you added a exit! task, but of course that actually blows me out every time. 🙂

samedhi17:11:47

Redirect stdout or something to see the result?

samedhi17:11:57

Also, long term, I am looking for a solution that plays well with the (watch) task.

crisptrutski17:11:03

Going to push a more up to date version now, overhauled the snapshot last night actually 😉

crisptrutski17:11:45

Removed exit, wasn’t really doing the right thing. Throwing is far more natural than System/exit >_<

crisptrutski17:11:25

branch is 0.3.0-reboot

samedhi17:11:27

@crisptrutski Cool, I got my standup soon, but will let you know by end of day how it worked out.

samedhi17:11:36

BTW, thank you for your work.

crisptrutski17:11:59

Haha, what work? 😛 This library has been super neglected

crisptrutski17:11:34

Glad to know it’s still solving problems. Wish I was doing Clojurescript work so I could use it myself 😛

Tim18:11:36

what is that like ui project build on boot?

Tim18:11:41

paren or something?