Fork me on GitHub
#boot
<
2017-08-02
>
donyorm02:08:15

So following @jaymartin's suggestion, would calling a -main function cause a new pod?

donyorm05:08:38

Ok new data, if I run (pom/add-classpath (io/file /path/to/file) main-classloader) within the main function it works

donyorm05:08:31

The file-seq definetely contains the right plugin file (they are equal to each other by .equals), so it must have something to do with map. Does map create its own environment or something weird like that?

donyorm05:08:07

Definetely had something to do with map. Changing extend-classpath to the following worked. Anyone know why this works like it did?

donyorm07:08:13

How do you build a library with boot? boot pom jar target seems to not include the source files (ex. core.clj) in the jar, even though show -f shows that they're in the fileset

donyorm07:08:31

Oh just noticed that most people include src in resource paths. Interesting

richiardiandrea07:08:48

@donyorm yes you have to do that, that is because source-paths are assigned a role that won't show up in the output 😄

donyorm07:08:20

@richiardiandrea So in most library projects src is actually a resource-path, rather than a source-path?

richiardiandrea07:08:03

it should probably be written somewhere I agree

donyorm07:08:16

But I'm guessing that if I do aot, I should have src as a source-path, right?

donyorm07:08:49

And yeah, I might add that as a PR to the FAQ, it seems somewhat counterintuitive to me

richiardiandrea07:08:57

@donyorm usually a library does not AOT, because you want to leave that decision to the user of your lib

donyorm07:08:59

@richiardiandrea Right, sorry I forgot to clarify. I meant if I were writing an end-user program (not a library) and using aot, I would have src in source-paths (sorry I switched projects on you there 🙂)

donyorm07:08:22

@juhoteperi Thanks, that makes sense

donyorm08:08:45

what's the best way to add an in-progress (i.e. not compiled or installed) project as a dependency of another project? The two project's will be distributed seperately but I'd like to work on them in parallel

richiardiandrea08:08:46

@donyorm boot and lein have the concept of checkout deps for that

donyorm08:08:40

@richiardiandrea Any documentation on how that works, google wasn't obvious

richiardiandrea08:08:39

Uhm...I thought it was documented somewhere...I never used that myself so cannot help here...sorry!

malcolmsparks09:08:01

Has anyone got an example of :checkouts as per https://github.com/boot-clj/boot/wiki/Boot-Environment - I haven't been able to get it working and it would be really useful for me right now - I often work on end-user projects where it would be useful to be able to evolve open-source libraries underneath.

malcolmsparks09:08:57

this is the same question as @donyorm has been asking I suppose

malcolmsparks09:08:04

The checkout task seems to be deprecated in boot.task.built-in: (core/deftask ^{:deprecated "2.6.0"} checkout ...

malcolmsparks09:08:14

It seems to work on the command line with 'checkout -d foo:1.0' - just verifying this

malcolmsparks09:08:38

At least I get the message on the console: Checking out foo:1.0...

martinklepsch09:08:13

let me prepare a small demo project real quick…

malcolmsparks09:08:10

When I try with checkout -d foo:1.0 I don't get my usual REPL...

malcolmsparks09:08:35

@martinklepsch that would be super-useful - I think there's a few of us in this channel who'd make us of it right away

malcolmsparks09:08:36

Presumably it doesn't matter how you create the checkout jar (lein, maven, boot, gradle), but consuming boot project will still wokr

malcolmsparks09:08:42

yay, I've got it working! I added the checkout on the command line at the end of my usual mantra

malcolmsparks09:08:59

now to get it working from inside the build.boot file

malcolmsparks09:08:28

this is life-changing stuff 🙂

malcolmsparks09:08:37

(out of band question, why is 'checkout' deprecated? is there a newer better alternative?)

donyorm09:08:14

The checkout task says it's deprerecated though

donyorm09:08:43

According to that lunk martin gave me, you can add :checkouts to your set-env! call

malcolmsparks09:08:11

I tried that but perhaps I got the value syntax wrong, it didn't wokr

malcolmsparks09:08:29

this works: (checkout :dependencies '[[foo "1.0"]])

malcolmsparks09:08:14

I think I forgot to quote my original checkouts value

richiardiandrea09:08:48

I would try more (set-env! :checkouts '[[foo "1.0"]])

malcolmsparks09:08:00

just testing again...

malcolmsparks09:08:34

yep, it works!

martinklepsch09:08:01

also stumbled into this one along the way: https://github.com/boot-clj/boot/issues/636 — am I missing something or is it just broken?

dominicm12:08:08

I've seen a lot of questions about checkouts recently. Someone (else) should document it a little better I think.

martinklepsch12:08:31

it’s not great documentation but at least something to point people towards 🙂

richiardiandrea12:08:23

Great thanks Martin!

richiardiandrea17:08:17

Is there any boot Node.js app template out there somewhere?

lwhorton19:08:42

@richiardiandrea what are you trying to do with node and boot?

lwhorton19:08:52

do you mean an initial template setup for clojurescript?

richiardiandrea19:08:58

I want to launch a REPL

richiardiandrea19:08:30

and I have an error so I was thinking of starting from a working template

lwhorton19:08:43

the first 2-3 chapters here are instrumental for beginners to cljs and/or boot: https://github.com/magomimmo/modern-cljs

lwhorton19:08:18

but in general the built-in boot task repl needs to be superceded by cljs-repl when working with cljs

richiardiandrea19:08:23

is it node? I thought it was browser only

lwhorton19:08:41

you are trying to use boot to start a node repl?

richiardiandrea19:08:53

yeah the browser one is easy 😄

lwhorton19:08:04

use a makefile and leave boot out of that entirely

lwhorton19:08:22

start-node:
  node

.PHONY start-node

lwhorton19:08:26

you can get into boot/sh and boot/do-sh but that gets very hairy quickly and for what gain?

richiardiandrea19:08:58

yeah there are also boot-node and boot-npm...my problem is a bit different and that is why I wanted to find a correct setup (in particular I am trying/maintaining boot-figreload)

richiardiandrea19:08:40

Thanks a lot anyway for your suggestions! 😄

bspaulding20:08:15

running boot watch test with boot-test, getting a stack trace in the output every time there’s a failure. is this expected? its a bit annoying to always scrollback

alexyakushev20:08:11

Hey folks. Perhaps this has been answered before, but I'll ask anyway: why does a fresh Boot install download so many dependencies when it's first run? Are all of those really necessary? I can see almost every version of Clojure in the list, at least that one has to be superfluous.

juhoteperi20:08:58

It probably downloads just the pom files, not jars

alexyakushev20:08:38

Ah, OK, that's true, many of those are just POMs.