Fork me on GitHub
#boot
<
2016-08-17
>
flyboarder00:08:40

@alandipert: omg I ran strace what am I looking at 😛

flyboarder00:08:26

discovered (thanks to strace 😉 ) that the ubuntu linux subsystem installs 14.04 LTS, this only has java7 when you install the bundled version, installing java8 right now

tianshu01:08:25

sometimes I run boot, boot is downloading something like this:

Retrieving maven-metadata.xml from  (1k)
Retrieving maven-metadata.xml from  (1k)
what does it mean?

micha02:08:07

@doglooksgood it's downloading some info from the clojars maven repository

micha02:08:56

it uses the information to figure out how to fetch your dependencies

tianshu02:08:58

@micha But my dependencies has already been fetched. is that using SNAPSHOT version cause it?

tcrawley02:08:35

@doglooksgood: It's likely, yes. SNASPHOTs are checked daily to see if there is a new version. That's done by downloading the maven-metadata.xml for the SNAPSHOT and checking it for a newer one

tianshu02:08:02

can I disable this?

tianshu02:08:23

I seems I can set this in maven's repositories section in settings.xml .

Tim03:08:17

ok, it I got this far with my deploy task for deploying to cljsjs:

(deftask package []
  (comp
    (download :url (format "" +lib-version+)
              :unzip true)
    (sift :move {#"^js-sha3-*/src/sha3\.js" "cljsjs/sha3.inc.js"})

    ))
but somethings not working right. how do I begin to debug this?

micha04:08:31

@tmtwd: the show -f task might be useful

onetom09:08:41

@doglooksgood: i dont think boot cares about the settings.xml unfortunately

onetom09:08:54

but by default snapshot versions are checked daily, so it shouldn't be a big issue

stuarthalloway12:08:00

how does one use https://github.com/adzerk-oss/boot-test without getting test files added to fileset (and then later included in jar)?

alandipert12:08:48

@stuarthalloway: add your test directory to source-paths and then the test files don't have output role

alandipert12:08:56

alternatively you could sift them out

stuarthalloway12:08:10

if I am AOT-compilling is sift the only option?

onetom12:08:25

@stuarthalloway: you can have a custom test boot task which modifies the source-paths before running the task provided by boot-test

alandipert12:08:26

hm, another option is specifying your aot namespaces instead of compiling all of them, aot has a namespaces arg

stuarthalloway12:08:17

@onetom but that affects every subsequent task as well, right?

alandipert12:08:52

it would - i tend to avoid doing that myself, but it depends what your personal conventions for calling tasks are

onetom12:08:31

exactly. i usually don't run the test task along with other tasks.

stuarthalloway12:08:58

I keep struggling with the “nonlocal impacts” of having only one fileset.

stuarthalloway12:08:13

I want to do X but not have X have cascading impact on other things

alandipert12:08:25

have you explored multiboot yet?

alandipert12:08:52

and i know that feeling 🙂

alandipert12:08:06

but don't worry after a few years your mind will take a new shape, fitted to sift

onetom12:08:11

now that something im also curious to hear about (multiboot)

alandipert12:08:17

it's an experimental way of doing parallel builds that came out of andrea richiardi's building of a test setup for us

stuarthalloway12:08:20

don’t know multiboot, failing at googling it

stuarthalloway12:08:19

sift is cool by I immediately found myself cutting against the grain there too

stuarthalloway12:08:40

I have an existing directory structure that I cannot change, and want to superimpose boot over it

stuarthalloway12:08:24

which leads to “take directory ‘foo’ from filesystem and add it to assets role of fileset under the name bar/baz’

stuarthalloway12:08:41

where I could not figure how to make sift do the “under the name bar/baz” part

alandipert12:08:07

i have yet to explore myself, i believe mike nygard made some inroads

onetom12:08:21

@stuarthalloway: are you trying to solve your current issue with boot because with lein it was too complicated / fragile / non-elegant?

alandipert12:08:30

also boot-in-boot is apparently what we're actually calling it

alandipert12:08:23

@stuarthalloway: i see, that's a conundrum. maybe manage a symlink in your build.boot? e.g. mkdir test-parent && ln -s test test-parent/test

alandipert12:08:16

basic idea there is change the directory in your build.boot with clojure code before adding any sources

alandipert12:08:09

another thought is looking into how add-sources work, and see if you can do it yourself but also add metadata to the added files. then you could sift them out by metadata later instead of by path

stuarthalloway12:08:08

@alandipert: I started down the road of writing my own add-at task, using sift-add as a model, but ran into undocumented private helpers fns and eventually an exception that I did not understand. Is there a conceptual reason that sift could not transform the paths on the way in?

onetom12:08:44

why sift --move is not an option? that's how we rename things in cljsjs packages

stuarthalloway12:08:12

@onetom finding the things to move is the problem, adding a dir puts them at the top of the fileset commingled with everything else

stuarthalloway12:08:49

then you need global knowledge to write a regex — not composable

alandipert12:08:53

had another thought. do you have java sources in this project?

alandipert12:08:57

ah bummer. i was thinking you could identify the test files by diffing output files and input files

skynet13:08:28

hey all, how do you handle test coverage in your boot projects?

onetom13:08:14

@stuarthalloway: while i can't help with your problem, i've noticed datomic in the error message. are you aware of https://github.com/tailrecursion/boot-datomic ?

alandipert14:08:31

it looks out to the filesystem to build a list of paths to remove from the fileset

alandipert14:08:16

we talked about adding a thing to sift, that adds metadata to whatever files were matched

alandipert14:08:57

then you could use that new option in concert with sift --add-source to add the tests to the fileset, and then later peel them off by filtering by metadata

alandipert14:08:28

there's already --add-meta but it needs a regex, which doesn't make sense for this case

stuarthalloway14:08:51

@alandipert thanks! on a call but will look at this and respond later today

stuarthalloway15:08:46

@alandipert: I think making sift have a few more primitive capabilities would be great

alandipert15:08:19

one thing we realized is that when you add sources with sift, if you have an upstream watch, it won't reload

alandipert15:08:29

but yeah sift is basically our CL loop

alandipert15:08:35

more insanity, the merrier

stuarthalloway15:08:02

that said, I well understand the benefit of proceeding slowly, making better choices, and not having to support something ugly forever. None of this stuff is blocking me atm

stuarthalloway15:08:43

the more fundamental thing to me is “losing” my filesystem paths when adding to the fileset, i.e. if I add directory “foo” I get the contents of “foo”, not “foo” itself

stuarthalloway15:08:23

^^ is that fundamental to the model in a way that prevents something like my add-at from being workable?

alandipert15:08:22

looking at your code in depth now - looks pretty close to sift, gonna play with it

anmonteiro15:08:30

@stuarthalloway: I’ve got around that limitation with:

(add-resource (io/file ".") :include #{#”^foo/"})

anmonteiro15:08:38

that adds foo and not just its contents

anmonteiro15:08:02

add-source and add-asset are also a thing and support :include too

stuarthalloway15:08:21

trying that now!

anmonteiro15:08:22

credits to @micha, actually

anmonteiro15:08:53

he pointed me towards this originally

stuarthalloway15:08:31

hm, how to I get a fileset to test that without putting it into a task?

alandipert15:08:06

boot -B sift --add-resource . --include "^test/" show -f is a way

alandipert15:08:00

the thing about it is the files go in with the test prefix which would mess up require

alandipert15:08:17

so this would need to be a prelude to marking them with metadata and renaming

stuarthalloway15:08:25

yea, multiple threads here

stuarthalloway15:08:41

I woud not be doing this with test stuff, probably with assets

alandipert15:08:10

yet another workaround which comes to mind, which i don't think would work until next release

alandipert15:08:27

is to create a new directory with a symlink inside it, that points to ../test

alandipert15:08:34

then you add the new directory to sources

alandipert15:08:47

this wouldn't work right now because boot doesn't follow symlinks yet

alandipert15:08:23

eg

.
├── my-test
│   └── test -> ../test/
└── test
    └── foo

flyboarder18:08:36

@seancorfield: how do I build a boot-new generator that can make functions with a body as well?

flyboarder18:08:59

In the defn generator it outputs a string, could that be any edn?

seancorfield20:08:44

@flyboarder: a generator can do whatever it wants in terms of manipulating files.