Fork me on GitHub
#boot
<
2017-08-01
>
donyorm03:08:35

Not sure seperate boot tasks would even work. You probably want to put them in composition

donyorm03:08:30

@qqq The figwheel task of the luminus boot template shows how to compose clj and cljs tasks. (This is a template file, so you'll have to manually insert the placeholders. The cljs profile for boot and luminus isn't working right now, so you can't create one) https://github.com/luminus-framework/luminus-template/blob/master/resources/leiningen/new/luminus/core/build.boot#L62

donyorm04:08:07

Actually yogthos just pushed a new version fixing that issue, so you can see a full project showing that task with lein new luminus proj +boot +cljs. Inside the build.boot will be a figwheel tasks which boot starts the server and starts the clojurescript compiler

richiardiandrea06:08:32

@qqq people do that exactly, both lambone and just/edge have two repls in the same JVM for instance (you just need a pod each)

qqq10:08:20

@donyorm , @richiardiandrea : okay, so my assumption was wrong -- and people in fact do regularly have multiple unrelated tasks + multiple repls running inside a single boot instance ?

donyorm10:08:54

depends on what you mean by unrelated. Often building clj and cljs isn't unrelated at all

donyorm10:08:03

The server needs the js files to display them

qqq10:08:07

sure, they're related as in they're part of the same project

qqq10:08:22

but the 'work done by boot tasks' in the two are quite separate and often use different dependencies

donyorm10:08:13

What are you trying to do, give us specifics

donyorm10:08:23

I'm a little confused

qqq10:08:53

sure, let me explain XY problem

qqq10:08:14

I currently have three terminals each running a different boot task (I have three separate boot.properties . build.boot files)

qqq10:08:44

1) cljs opt none + opt advanced 2) clj, for packaging into aws lambda functions 3) clj for a web server I'm running

qqq10:08:15

so this is three separate jvms

dominicm10:08:54

@qqq tasks compose, so as long as you don't have wait everywhere, you can do: boot cljs aws-lambda web-server wait

dominicm10:08:08

probably with a watch or something too no doubt

dominicm10:08:30

I'd say that this is common, to have them share the same pipeline

donyorm10:08:23

yeah I would compose those as one task, there isn't much reason not to and it will save resources

juhoteperi10:08:03

Also, your could just start single boot: boot repland then start those Boot piplelines parallel with (delay (boot (cljs-build))) (delay (boot (aws-lambda)))

juhoteperi10:08:28

Though there are some pitfalls with this, if those tasks modify classpath etc.

donyorm11:08:54

Said this in #clojure but I may get better answeres here.

jaymartin18:08:27

@donyorm regarding extend-class in repl vs -main, I’m wondering if it could be related to boot using pods to isolate classpath (https://github.com/boot-clj/boot/wiki/Boot-for-Leiningen-Users#repl-dependencies). Just getting started with boot myself. Would appreciate an authoritative answer too.

qqq22:08:49

I have a machine with 12 cores (at 2.0 ghz each), with 86 gb of ram ; my initiall boot "opt none" compile time is 72 seconds -- is there a way tell boot to call cljs in parallel ?

qqq22:08:02

:parallel-build 🙂