Fork me on GitHub
#boot
<
2016-11-04
>
ag00:11:22

Ok… finally I think I have managed to migrate everything to boot-clj from lein.

romain00:11:55

@ag Don't you miss figwheel ?

ag00:11:31

@romain I dunno yet.

ag00:11:02

I actually just realized that I forgot to port devcards… this should be fairly easy

ag00:11:48

but if I really miss figwheel should’t I be able to make it work? Or it’s still would be a bit “clunky”?

romain00:11:18

I'm very new to boot. I just began modern-cljs tuto to get started and there is a live reload solution within

ag05:11:13

@romain oh yes, there’s boot-reload but I still was hoping to use figwheel - Bruce Hauman seems to be doing some cools stuff with it.

dominicm08:11:53

@ag it's really not much different with the boot tools. Nobody has taken the time to show the source code where the error is yet, but I don't think it would be complicated to add that to boot reload / boot cljs

lxsameer09:11:35

I totally mixup on filesets. I want to know that how is the workflow of compiling cljs files and serving them via my own ring app, would be ?

lxsameer10:11:58

should i serve the target directory ?

mynomoto12:11:59

@ag I know that @richiardiandrea was looking into fixing something on boot-figwheel, I never used it myself.

lxsameer13:11:43

@mynomoto can you please explain that line to me ?

mynomoto13:11:49

@lxsameer that is using a compojure route to serve your resources on the "/" path. It will make everything on your resources available on the server and should only be used for dev.

mynomoto13:11:15

So if you have "assets/images/pic.jpg" on your output fileset it will be served if you do a request to localhost:8000/assets/images/pic.jpg if you are running a server in the boot context.

lxsameer13:11:46

so this way / of my server map to fileset root ?

lxsameer13:11:22

thanks i have to try it

richiardiandrea15:11:32

I am actually now reconsidering fixing boot-figwheel, @juhoteperi actually already went through that path and suggested augmenting boot-cljs instead

naomarik17:11:57

@richiardiandrea what is your approach? i kinda got figwheel working in a task using figwheel-sidecar.repl-api I’m dumping the figwheel stuff into a resource which is being served via boot serve… my issue is that sometimes it does not reload the changes on save, i’m assuming cause the file sync takes place onto the temp fileset and figwheel notifies the browser too soon

naomarik17:11:34

i can throw this example up in a gist if you want

richiardiandrea17:11:55

@naomarik yes the problem with the sync is exactly that, figwheel writes on dirs that are not managed by boot and given that boot-http serves from the classpath you won't see the new file sometimes

richiardiandrea17:11:01

no no I have already been there

richiardiandrea17:11:16

that path won't work unfortunately

naomarik17:11:18

i think if figwheel had a single option to delay browser notify

naomarik17:11:20

it would work

naomarik17:11:47

just until the time it takes to copy the stuff into the temp fileset

richiardiandrea17:11:33

yes a hook after figwheel completes would be a patch to that...you can manually call boot functions that sync the mutable figwheel files with the immutable boot fileset

richiardiandrea17:11:38

but it is a super hack

richiardiandrea17:11:15

figwheel should only be used probably to compile on the fileset, disable all the watchers

richiardiandrea17:11:27

and this is basically what boot-cljs does

richiardiandrea17:11:59

so @juhoteperi is right when he says that it is probably better to add the figwheel client to boot-reload

geoffs17:11:08

@micha or @martinklepsch , I'm looking at implementing issue #450 (making 'task-options!` able to use delays). It seems like the most straightforward way to make it work would be to write essentially an apply wrapper that walks through all of the arguments to a task and forces it if it's a delay. Any thoughts on that approach?

geoffs17:11:50

or if you had another idea how to implement it, I'd love to hear it

micha17:11:06

let me refamiliarize myself with the issue, it's been a little while 🙂

micha17:11:52

there was an issue with that approach

micha17:11:26

the issue with delays is that the user should be able to assume that task-options! merges options synchronously

micha17:11:35

and not asynchronously via delays

micha17:11:48

like if you put a delay in there and then call task-options! after that

micha17:11:04

i suppose we could have the macro know if the value is a delay

micha17:11:11

and keep wrapping in delays

geoffs17:11:26

i'm not sure I'm following you 😕

micha17:11:36

haha sorry that was terrible language

micha17:11:44

i mean the issue i see is this:

micha17:11:16

(task-options! foo {:bar (delay ...)})
(task-options! foo {:bar nil})

micha17:11:21

what should happen there?

micha17:11:47

does the delay just get replaced by nil?

geoffs17:11:44

okay, interesting point. That's what would happen currently with a non-delay value right?

micha17:11:55

there is also this form:

micha17:11:13

(task-options! foo #(update-in % [:bar] inc))

micha17:11:22

this could force the delay of course

micha17:11:27

but it's something to consider

geoffs17:11:23

yeah. okay, i see what you're getting at. that's the case where if we wanted to handle it "transparently" to the user, we'd wrap it in another delay and keep doing that...

micha17:11:43

right, that's a possible solution

geoffs17:11:52

but it's potentially surprising because that means the update to the task options will happen later than expected because of the delay.

micha17:11:18

yeah tricky

geoffs17:11:32

cool. good food for thought. I'll probably take a stab at just getting it working without considering that angle to get a better handle on what the solution will look like

ag22:11:57

hey guys… is there a way to “check” is serve is already running and "wrap" a task around it. So let's say I have two separate cljs profiles: dev and devcards - they both require pandeiro.boot-http/serve. I can't truly restart serve task. because of this: https://github.com/pandeiro/boot-http/issues/25. So what if in my task I check if ring-handler is running and if not then (serve)

ag23:11:46

clojurescript optimizations failing after uberjaring, neither :simple nor :advanced works. Can someone give me an insight?