Fork me on GitHub
#boot
<
2015-07-23
>
colin.yates14:07:10

hi all - any examples of a boot script that will includes ClojureScript testing using nashorn? Or any recommendations for which boot-cljs-test I should use?

martinklepsch14:07:16

@colin.yates: this one is shipped with tenzing and worked well for me: https://github.com/crisptrutski/boot-cljs-test

martinklepsch14:07:33

Haven’t tested Nashorn though I believe

martinklepsch14:07:32

@colin.yates: if you just want to play around before integrating: lein new tenzing testing-things +test simple_smile

colin.yates14:07:47

I have a lein project which uses cljsbuild and phantomjs to run the tests and it works great, but it is fairly ancient. When I ‘lein ancient’d it I ran into all sorts or errors. Googling then led me down a path of pain so I thought I would look at starting from scratch simple_smile

colin.yates14:07:31

oh hang on - you use lein to create a boot project - nice!

martinklepsch14:07:26

yeah, there is no such thing as new for boot yet, although it definitely would be cool. lots of ideas, limited time 😉

juhoteperi14:07:57

I don't see why project scaffolding tool would need to be built on top of boot

juhoteperi14:07:06

But yeah, lein templates don't compose

juhoteperi14:07:27

Would probably be useful to check if JS community has invented any sane tools

martinklepsch14:07:52

@juhoteperi: yeah composition is a big thing, but also adding some boilerplate after creation and just in general programmatically modifying your sourcetree could be interesting

martinklepsch14:07:05

besides that leiningens template stuff is seriously annoying. It’s all sexps and we do string templating. 😫

crisptrutski15:07:13

only js tool i can think of is yeoman

meow15:07:53

I'm starting to work with cursive, which uses project.clj as a way of defining/managing projects. So it would be useful if my boot scripts could keep a project.clj file in sync with what's defined in my build.boot file.

cfleming15:07:02

@meow: I saw someone mention a lein-generate task yesterday, which might work well for that. I’d like to know if it works for Cursive so I can point people at it.

meow15:07:54

@cfleming: yeah, that's right. I think I saw that, too. @martinklepsch - was that you that had such a thing?

martinklepsch15:07:20

I remember the conversation but not who it was. There's a log somewhere. Maybe search for cursive there?

martinklepsch15:07:52

Also check the wiki

martinklepsch15:07:05

Someone might have added it there. :)

meow15:07:01

@martinklepsch: all I can find is you mentioning having lein-generate in your profile.boot file

meow15:07:17

is that something that can be used for this?

martinklepsch15:07:28

@meow: let me know if this helped please

martinklepsch15:07:01

@cfleming: @meow — without having an idea if it works, I added this page: https://github.com/boot-clj/boot/wiki/For-Cursive-Users

martinklepsch15:07:15

please adjust if there’s something wrong or could be improved.

meow15:07:19

@martinklepsch: yes, thank you. I will take a closer look later today.

meow15:07:38

good idea to do that wiki page - I will keep that in mind when I give it a try

martinklepsch17:07:50

@micha: yo! simple_smile are fileset entries serialized before they’re passed to pods?

martinklepsch17:07:08

Someone was running into problems when attaching huge metadata to a fileset entry https://github.com/hashobject/perun/issues/49#issuecomment-124168241

samedhi17:07:47

I was trying to start up a python development server as a task, and including it as part of my dev task. https://gist.github.com/samedhi/6e3039845e4fd0e58e80 . Unsuprisingly, the python server "blocks" my cljs from being recompiled when I edit it and (and file reloads in general)? Any advice on how I could integrate this so that the server is started (and killed when boot exits) while also allowing the cljs task to recompile my code?

martinklepsch18:07:46

@samedhi: start the server in a separate thread and then use boot.core/cleanup to stop the thread.

samedhi18:07:27

cool beans, thank you.

micha20:07:29

i'm reading the issue now

micha20:07:25

why is content being passed as metadata there?

micha20:07:45

also i think it we might get around the string limitation if boot used streams instead of strings to pass forms between pods?

martinklepsch20:07:49

so @podviaznikov came up with this idea of attaching more things to fileset objects for a static site generator. I.e. adding a generated permalink to the metadata instead of saving it in file(s)

martinklepsch20:07:00

Someone just commented again

martinklepsch20:07:32

potentially that metadata approach is flawed for compilation-like things, although it seemed pretty handy at first

micha20:07:39

i don't fully understand what's going on there

micha20:07:17

seems like perhaps you want a sort of document descriptor file

micha20:07:23

like .cljs.edn for cljs applications

micha20:07:32

where you can store the document-level metadata

martinklepsch20:07:36

yeah, this was the first iteration of it

micha20:07:42

and the various tasks can coordinate around that?

micha20:07:39

but the string problem is due to pods shipping forms between themselves as strings, yes?

micha20:07:55

like the asciidoc task doesn't actually make huge strings

micha20:07:03

it's boot that's screwing that up?

martinklepsch20:07:09

@micha: have you seen the last comment? it seems to be a java limit

martinklepsch20:07:22

It’s not boot.

micha20:07:27

right but if it's the pod communication then we can fix it

micha20:07:30

by not using strings

martinklepsch20:07:44

So you might as well continue with whatever you did before simple_smile

micha20:07:51

boot is doing pr-str on one end and read-string on the other

micha20:07:05

we could use nippy or freshen or some stream thing instead

micha20:07:17

s/freshen/fressian/

martinklepsch20:07:33

yeah that’s what I thought and so I thought maybe the problem is on that side but probably it’s sane to put file sized things in files simple_smile

micha20:07:00

i like that people are using metadata though

micha20:07:09

we haven't explored that enough

micha20:07:24

maybe cool new patterns will emerge

micha20:07:56

did you already try the document descriptor file approach?

martinklepsch20:07:34

I guess the issue breaks down to this: (boot.pod/with-eval-in (boot.pod/make-pod) (pr-str ~(reduce str (take 65536 (repeat "s")))))

micha20:07:07

i believe we can fix that

micha20:07:26

i mean in the case where you don't explicitly call pr-str in your pod on something enormous

martinklepsch20:07:52

If you have any thoughts on this that issue is probably the best place.

micha20:07:59

(boot.pod/eval-in (boot.pod/make-pod) (first [~@(range 0 100000000)]))

micha20:07:16

for example

martinklepsch20:07:18

And if you’re curious about crazy use cases for metadata perun is probably interesting simple_smile

martinklepsch20:07:16

> The problem with storing output in the metadata is that there is a limitation to what you can store in a string in a .class format (65535 bytes). I’m not really familiar with this stuff enough to know if the above would be a solution to this?

micha20:07:42

instead of using pr-str --> read-string in the pod machinery itself we can use something like fressian, which is a streaming protocol

martinklepsch20:07:03

yeah, that sounds good

podviaznikov22:07:13

@martinklepsch: just to clarify: I wasn’t the one who came up with idea of using fileset metadata instead of file. @juhoteperi came up with initial idea and I like it. Just don’t want to take credit for other people ideas

martinklepsch22:07:42

When I grow up I want to be as productive as @juhoteperi 😄

podviaznikov22:07:28

so did I understand this discussion correctly: we can still use fileset metadata in but (pr-str (eval expr)) should be changed in boot? Is it correct?

martinklepsch22:07:41

That’s my takeaway, yes @podviaznikov