Fork me on GitHub
#boot
<
2016-04-22
>
brianosaurus00:04:55

what’s the search order for resources? I’m trying to add a test/resources directory where boot will find files and use those first but that doesn’t appear to be working.

micha00:04:25

@brianosaurus: the files are loaded onto the classpath, so it's last one wins

micha00:04:38

i don't think what you want to do will work

brianosaurus00:04:28

hmm. I have a property file for a java framework we’re using and I want to use a different one for test. How would one accomplish that?

micha00:04:28

so the classpath is comprised of :source-paths and :resource-paths, but also of files in the fileset

micha00:04:56

so you can use a task to overwrite the production file with the test one

micha00:04:21

that would be the most reliable and repeatable way to do it

micha00:04:55

you could also, alternatively, have two directories

micha00:04:00

one for test and one for prod

micha00:04:17

and make a "profile" type task

micha00:04:35

so you'd do like boot test build doit and boot prod build doit

brianosaurus00:04:17

@micha: thanks. that’s very helpful.

micha00:04:40

@brianosaurus: there are some examples, one sec

micha00:04:40

it's also easy to make "flavors" similar to what you have in gradle

micha00:04:22

@brianosaurus: i don't have an example handy but @richiardiandrea uses this technique

richiardiandrea00:04:54

yes, you need to pass a param using -e, in my case boot -e flavor=backend dev

richiardiandrea00:04:07

that part is needed becasue deps are then set with set-env! right after

richiardiandrea00:04:43

then in my case I have choosen a options multimethod for dispatching https://github.com/Lambda-X/lambdax-web/blob/devel/build.boot#L89

slotkenov10:04:13

I am using (repl) in my task. When the task is running and I (exit) it doesn’t return to the prompt. Neither Ctrl-C nor Ctrl-D stops the process. I need to manually kill it. Am I missing something?

micha12:04:13

@slotkenov: can you explain the situation a little more?

micha12:04:25

what is (exit)?

slotkenov12:04:19

When starting this task on the command line with boot dev it starts everything up and I end up in the repl.

slotkenov12:04:01

Then I type (exit) in the repl (or use Ctrl-d) to exit the repl. It doesn’t return me to the command line however

slotkenov12:04:05

As you can see in the snippet I’m using repl because I’m trying to set it up with the dirac middleware

slotkenov12:04:45

Maybe there is a better way to do this?

slotkenov12:04:19

I also need to run (dirac.agent/boot!) in the repl. I’m trying to automate all that in the boot task

slotkenov12:04:51

When I add the :server flag to the repl call it doesn’t open the client and I can stop the task without any problem by pressing Ctrl-c

slotkenov12:04:48

I need to open a client repl in another command line window with boot repl -c and then issue (dirac.agent/boot!) inside that repl client

slotkenov12:04:17

It would be nice if that could be done automatically by running the task though

dm314:04:17

you have repl going after the watch

dm314:04:38

watch is the thing that doesn't let you exit

lwhorton15:04:48

is it not possible to include .clj files via boot-cljs or am I missing something obvious?

micha15:04:37

@lwhorton: how do you mean "include"?

micha15:04:56

@slotkenov: ah i think i see now, as @dm3 said, the watch task will block (or the repl client will block)

micha15:04:10

@slotkenov: so what you might want to do is run your pipeline from in the repl

micha15:04:17

boot repl

dominicm15:04:47

I do find the blocking/non-blocking slightly confusing. I don't have a better alternative (except maybe that tasks can indicate that they're going async, and the pipeline should block at the end?)

micha15:04:51

then when you're in the repl you can do (boot (watch) (task1) (task2))

dominicm15:04:15

It's easy when you know, but it makes it hard to compose sometimes, if you remove a task, suddenly you need to add a new one to block.

micha15:04:35

i like it that tasks don't need to cooperate or negotiate with some supervisor tough

micha15:04:00

limits the amount of arbitrary stuff you need to keep track of

lwhorton15:04:13

@micha it looks like boot-cljs can’t find any clj file that’s not .cljc for some reason (maybe by design?)

micha15:04:51

can you paste your build.boot file @lwhorton ?

micha15:04:08

certainly not by design

juhoteperi15:04:35

@lwhorton: ClojureScript by design can't read clj files

juhoteperi15:04:41

Nothing to do with boot-cljs simple_smile

micha15:04:47

what about macros

micha15:04:58

it does load .clj files for them

juhoteperi15:04:01

Ah right, macros. But that is a special case 😄

juhoteperi15:04:54

But if the namespace only has clj file and no cljs file, one needs to use :require-macros instead of :require

juhoteperi15:04:21

:require with :load-macros will load both cljs and clj files, but fail if cljs doesn't exist

lwhorton15:04:36

i’ve wasted all morning trying to convert cljs.test to more friendly when given it which just points to the appropriate testing macro

lwhorton15:04:45

still cant get it, lol

lwhorton15:04:26

but thanks for the tip, if I use explicit :require-macros then it can be a clj file

slotkenov16:04:09

Thanks @dm3 and @micha, I'm going to play around a bit more with that knowledge.

lwhorton16:04:16

is that a caching issue, a compile issue, a goog.require issue? I’m not sure where to start

brianosaurus16:04:00

@richiardiandrea: I just got around to looking at your build.boot for lambda-x. Nicely done. Thanks for forwarding that.

richiardiandrea16:04:25

hey thanks! @brianosaurus the thanks are for the authors and contributors of this wonderful tool simple_smile

brianosaurus16:04:17

@richiardiandrea: took me a second to figure out why you have lambs on your website. 😄

richiardiandrea16:04:37

well that's part of the brand, lambs-da-x...well..I am not choosing the marketing strategy here 😄

brianosaurus17:04:35

I like it. Makes your team seem approachable. The contact us image is particularly good.

richiardiandrea17:04:37

thanks for the feedback, indeed maybe my picture is the most formal 😄