Fork me on GitHub
#boot
<
2017-04-07
>
lsenta01:04:05

boot-reload doesn't reload macros for me, I have to restart the whole compiler every time. Is that expected?

thosmos03:04:38

I have two build pipelines, one builds a CLJS app with :optimizations :none and outputs it to a target folder that the second pipeline watches and serves with an HTTP server. The weird thing is that one file amongst the many CLJS output files, goog/events/eventtarget.js, is getting ignored by the server pipeline’s (watch) task, even though all the other files aren’t. Any ideas why only this one file is ignored by the (watch) task?

richiardiandrea04:04:24

Nothing comes to mind, it is odd indeed

richiardiandrea04:04:17

Do you want to modify it? You rarely need to change goog files

qqq04:04:59

Have you tried rm -rfing all the output dirs? I get these weird cljs errors all the time, and somehow cleaning the output dirs 'fixes' it

qqq04:04:13

It's completely unsatisfying; but I don't know how else to deal with them.

thosmos05:04:28

Things are getting stranger. Yes I’ve tried rm -rf. So, I can make the watch task ignore the directory where the deps are, or even remove the watch task, but even then the http server app won’t load just that one file. I’ve verified that the file gets copied into the boot temp folder. So neither the boot watch task, nor my HTTP server app will load that one file.

thosmos06:04:08

here’s the network tab of devtools showing how all the other files are getting served: https://ibb.co/niQK0a

thosmos06:04:49

So, I was wrong, the file is not in the boot temp directory. If I log into the app via a REPL, and then do (:directories (boot.core/get-env)) and then do an ls of each of the temp directories, that one file is missing from the one that contains the CLJS resources … (http://paste.lisp.org/display/343710) So now the question is why is Boot missing that one file when it transfers resources into its temp directories?

borkdude11:04:55

(reposting from clojure-spec) Has anyone seen a similar error message like this lately? Attempting to call unbound fn: #’clojure.spec/macroexpand-check We get it in our ClojureScript build. We’re using clojure.future.spec alpha15. We’re using boot with boot-cljs. Can’t reproduce, happens now and then.

chiao14:04:19

I’m trying to add a local jar for a dependency, without using boot install. Is the task to use (sift :add-jar)? I’m having difficulty understanding how to use the command, and haven’t been able to find examples.

borkdude15:04:13

boot reload tries to reload files from the wrong URL: /public/js/app.out/dre/frequency_report/events.js.map - the public should not be there, as the public folder is reachable from the root URL

borkdude15:04:18

How do I accomplish this?

borkdude15:04:20

It’s basically the same issue I had two years ago when I first tried boot, LOL https://github.com/adzerk-oss/boot-reload/issues/18

borkdude15:04:23

So boot reload also accepts an asset path

borkdude16:04:35

cool, it worked!

timgilbert21:04:20

Hey, kind of a noob question: I'm trying to use the cljsjs packager for a bunch of javascript files that I've built locally via an external process (webpack). The ordinary boot stuff looks like (comp (download :url "foo") (sift ...) (pom ...) (jar ...))

timgilbert21:04:02

So I want to just get an input fileset from a build/ directory parallel to build.boot

timgilbert21:04:33

I've looked at https://github.com/boot-clj/boot/wiki/Filesets but I can't quite figure out what the right function to call is

timgilbert21:04:03

But what I'm looking for is "take all the files from build and feed them into the pipeline"

thosmos21:04:15

@timgilbert that would be something like (set-env! :resource-paths #{"build"} ,,,) in the build.boot which adds that directory to the classpath so you can access it inside of tasks

timgilbert21:04:08

Thanks @thosmos. Once that's done, would I use like (sift) to restrict the fileset from "everything" to "just the files I'm interested in"?

richiardiandrea21:04:00

@anmonteiro awesome! How long did boot repl take?

anmonteiro21:04:36

@richiardiandrea not my tweet 🙂

richiardiandrea21:04:53

oh lol sorry didn't notice that 😉

thosmos22:04:25

@richiardiandrea that was my tweet, I’ll try something that is more timable

richiardiandrea22:04:06

cool I am curious now, good job!

thosmos22:04:47

boot -h with no build.boot takes real: 4.964s user: 13.532 sys: 0.488s (I think real is less than user because it has 4 cores)

anmonteiro22:04:33

that’s not bad at all

richiardiandrea22:04:55

with nRepl maybe one minute?

anmonteiro22:04:13

2.92s user 0.27s system 48% cpu 6.654 total

anmonteiro22:04:31

this is time boot -B help on my 2016 MBP

thosmos22:04:29

on my 2011 MBP: time boot -B -P help: 12.46s user 0.62s system 389% cpu 3.361 total

thosmos22:04:11

@timgilbert you only need to sift in order to get things to match your deps.cljs. So, presumably since your files are already built, you could either put them where you want them or you could move them with sift …

timgilbert23:04:59

Ah, I see @thosmos, thanks. So implicitly everything in :resource-paths is part of the fileset, right? I think it’s finally starting to come together for me… 🤔