Fork me on GitHub
#boot
<
2016-05-16
>
codemartin10:05:11

So I set up Boot to compile to compile CLJS and all works fine and dandy (build.boot: https://www.refheap.com/119124). What I don't really get it where to put my .html file that contains a <script src="main.js"></script> tag? What I've seen googling is to add middleman, a ruby lib (which also means running jruby and this ruby framework - a bit overkill?). How is this usually done by boot clojurescript programmers?

juhoteperi11:05:47

@codemartin: Just place the html file in some resource-path folder and serve using a http server (for example boot-http)

juhoteperi13:05:43

Does someone remember if some Boot tasks uses Clojure.tools.namespace to reload changed namespaces? All current test tasks seem to use pod pools

micha15:05:03

@juhoteperi: i think @danielsz's system tasks can do both

juhoteperi15:05:55

@micha: Yes, I found that. It doesn't run c.t.n inside pods but it helped me to right track.

juhoteperi15:05:18

Is there any way to fail a task without throwing an exception?

micha15:05:50

the task can simply elect not to call the enxt handler

micha15:05:02

if that's what you mean by "fail"

juhoteperi15:05:22

I'm writing a test runner so I need the process to fail when running in CI but when running with watch I'm handing displaying the errors inside task so throwing an exception adds unncessary cruft to the output

mobileink15:05:30

how can i copy files from the checkouts dir to a subdir of the fileset? i’ve got code that uses add-asset to put the checkout dir contents into the fileset, but i have multiple checkouts, and each must go under a “module” name, e.g. target/greetings/ rather than just target/. i could write code to explicitly copy checkout contents to a tmp dir, and then add-asset that, but there must be a better way.

micha15:05:08

perhaps manifest files in your module jars

micha15:05:26

or something like that

micha15:05:57

basically you probably need some kind of file that describes the contents of the "module" package

micha15:05:18

since it's not exactly a java JAR

micha15:05:24

it needs its own package descriptor file, like how war files have web.xml, maven jar files have pom.xml, your thing needs some file too

mobileink15:05:45

ugh. a dir-copy function is starting to sound pretty good.

juhoteperi16:05:42

I had to add a option to select if the task should throw exception (so the process exits with failure) or if the task just doesn't call the next handler

alandipert16:05:02

that looks great

martinklepsch17:05:31

@juhoteperi: nice!

juhoteperi17:05:30

And now it actually works!

juhoteperi17:05:59

Took me an hour to notice I was using wrong namespace for error keys

juhoteperi17:05:07

Running single integration test namespace takes "only" 10 seconds

richiardiandrea19:05:01

I remember having seeing here, but is it possible to execute an arbitrary (require ...) directly from the boot cmd line? I am working on a cider feature and I would like to include a task definition from the cmd line...

richiardiandrea19:05:37

I know that repl can initialize things, but what about a bare boot command?

richiardiandrea19:05:14

Deraen, nice, prettier than mine for sure 😉

richiardiandrea19:05:53

also I was thinking that now my parellel test feature is kind of clunky as you need to define a task containing the tests, ...probably it can be improved...

richiardiandrea19:05:19

I also discovered a bug that I am fixing as we speak

juhoteperi20:05:27

Oh, right boot.test was included in core 2.6.0

juhoteperi20:05:47

Or was that for testing boot itself?

richiardiandrea21:05:45

@juhoteperi: it can test clojure.test stuff in general, collecting the summaries of the parallel executions

richiardiandrea21:05:53

you just need to include the is, testing ...in a deftesttask...a build.boot sample is in boot/boot/core

juhoteperi21:05:05

Looks useful for testing Boot tasks

richiardiandrea21:05:17

yes, but it can test anything

juhoteperi21:05:53

Yes but boot-in-boot is unnecessary for testing libraries and applications

richiardiandrea21:05:06

definitely right

bendy21:05:20

Hey all, I have a questions regarding a common boot practice of wrapping constants in + signs

bendy21:05:41

does that have any specific meaning in clojure or is it just paying homage to common lisp naming conventions?

micha21:05:55

@bendy: it doesn't mean anything special in clojure

bendy21:05:37

is it something you've seen often in clojure code?

micha21:05:12

it's not really "idiomatic" or anything

micha21:05:17

in clojure

bendy21:05:17

I think it's an awesome convention, and I'd like to start using it more if it's idiomatic

micha21:05:24

maybe it is?

bendy21:05:30

well, we should start a revolution!

micha21:05:41

hahaha sounds good to me

bendy21:05:12

They could be called +frankensteins+

bendy21:05:28

spread the word!

richiardiandrea21:05:28

@juhoteperi: another disadvantage of boot-in-boot is that at the moment it does not accept dependencies, so the tests should be required in build.boot in order to be visible (in the "main" pod so to say)

adamfrey21:05:06

@juhoteperi: boot-alt-test is sooo nice. Thanks!

adamfrey21:05:20

I’m putting it to use already.

richiardiandrea21:05:52

yeah it is very nice, I am considering adding it to lambone by default