Fork me on GitHub
#boot
<
2016-10-08
>
alandipert14:10:51

@borkdude that's great! would you consider a PR that looked for a bundle.edn on the classpath? that way i could put my bundle in a clojar

borkdude15:10:14

defaults to boot.bundle.edn on the classpath, you can override it

alandipert16:10:40

@borkdude awesome, thanks! I'll definitely use this

borkdude16:10:03

That’s an honor to hear from one of the core contributors to boot 🙂

arohner20:10:41

I’m trying to use boot-cljs for the first time, and I have a resources/js/dev.cljs.edn file. My compiled .js is going to target/ though, and I don’t know why. I thought the output of a .cljs.edn file goes to the same directory as the .cljs.edn file?

arohner20:10:25

Configure the compiler to produce compiled JS at a location derived from the file's path, e.g. given the file foo/bar.cljs.edn the output JS file will be foo/bar.js.

pesterhazy20:10:38

@arohner: boot only ever touches the target directory, that's what makes it safe

arohner20:10:25

well then the docs are confusing 🙂

arohner20:10:57

ok, so it outputs to a directory relative to the boot (target)

pesterhazy20:10:18

Well a boot task transforms a fileset

pesterhazy20:10:58

You only see the end result, which gets synced to the target directory

pesterhazy20:10:39

Have a look at the explanation on boot's home page

mikebelanger21:10:41

arohner what are you trying to do? target is considered the standard output directory for boot — are you trying to prevent boot from moving your .cljs.edn from getting outputted into your target directory?

arohner21:10:17

I just wanted my compiled .js in resources/public/js/

arohner21:10:01

but mainly I was confused, because the docs mention in several places that the .js output is relative to the .cljs.edn, not ‘under (target), corresponding to .cljs.edn'

anmonteiro21:10:05

@arohner so the compiled JS will always end up in your target directory

anmonteiro21:10:26

what you can do is add your resources dir to :resource-paths in Boot and have your html served from there

anmonteiro21:10:28

it might take a while getting used to Boot’s concepts, but IMHO it kinda makes sense overall

anmonteiro21:10:36

i.e. Boot will never mutate your project’s directory

anmonteiro21:10:07

^ that make sense?

arohner21:10:52

@anmonteiro in your example, how does JS get served? It looks like target/ isn’t a part of :resource-paths, and nothing is copying it to resources/

anmonteiro21:10:20

so the thing is that you add resources/ to :resource-paths in Boot’s set-env!

anmonteiro21:10:29

and you serve the HTML & JS from target/ when everything is built

anmonteiro21:10:18

@arohner I’ve recently added Boot support in the Om repo https://github.com/omcljs/om

mikebelanger21:10:22

@arohner yeah what anmonteiro said. Plus, I have to warn you, Boot has a way of classifying Fileset objects that might be confusing for your workflow. One of those classifications is ‘resources’ (files that get don’t get compiled/emitted by output to target directory. See here: https://github.com/boot-clj/boot/wiki/Filesets#roles-of-files

anmonteiro21:10:32

maybe you can take a look there as an example to follow

anmonteiro21:10:32

@mikebelanger resources definitely get emitted as output

mikebelanger21:10:37

@anmonteiro sorry I mean *files that don’t get compiled/*Do get emitted by output into target directory. Negative was only applied to first one 😛

anmonteiro21:10:01

sounds about right, I didn’t understand the first time 🙂

mikebelanger21:10:24

@anmonteiro My mistake - I wasn’t clear

arohner23:10:00

I’m hitting what appears to be a race condition:

java.util.concurrent.ExecutionException: java.nio.file.NoSuchFileException: /Users/arohner/.boot/cache/tmp/Users/arohner/Programming/amanuensis/k5w/fwjp2k/public/js/dev.out/amanuensis/http/routes_common.cljc

        UnixException.java:   86  sun.nio.fs.UnixException/translateToIOException
        UnixException.java:  102  sun.nio.fs.UnixException/rethrowAsIOException
        UnixException.java:  107  sun.nio.fs.UnixException/rethrowAsIOException
         UnixCopyFile.java:  526  sun.nio.fs.UnixCopyFile/copy
UnixFileSystemProvider.java:  253  sun.nio.fs.UnixFileSystemProvider/copy
                Files.java: 1271  java.nio.file.Files/copy
                       nil:   -1  sun.reflect.GeneratedMethodAccessor34/invoke
DelegatingMethodAccessorImpl.java:   43  sun.reflect.DelegatingMethodAccessorImpl/invoke
               Method.java:  483  java.lang.reflect.Method/invoke
            Reflector.java:   93  clojure.lang.Reflector/invokeMatchingMethod
            Reflector.java:  207  clojure.lang.Reflector/invokeStaticMethod
            filesystem.clj:  150  boot.filesystem/copy!
            filesystem.clj:  179  boot.filesystem/patch!
               RestFn.java:  146  clojure.lang.RestFn/applyTo
                  core.clj:  663  clojure.core/apply
                  core.clj: 2616  clojure.core/partial/fn
               RestFn.java:  408  clojure.lang.RestFn/invoke
                  core.clj:  930  boot.core/fileset-syncer/fn/iter/fn/fn/fn
                  core.clj: 2020  clojure.core/binding-conveyor-fn/fn
                  AFn.java:   18  clojure.lang.AFn/call
           FutureTask.java:  266  java.util.concurrent.FutureTask/run
   ThreadPoolExecutor.java: 1142  java.util.concurrent.ThreadPoolExecutor/runWorker
   ThreadPoolExecutor.java:  617  java.util.concurrent.ThreadPoolExecutor$Worker/run
               Thread.java:  744  java.lang.Thread/run

arohner23:10:02

Each time I run the task, it crashes on a different file, with a low (<10%) chance of completing without error

arohner23:10:02

I’m pretty sure it’s not https://github.com/boot-clj/boot/issues/438, because I’ve never opened some of the files it’s complaining about, e.g. om.transit