This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-08
Channels
- # aleph (4)
- # beginners (34)
- # boot (37)
- # cljs-dev (5)
- # cljsrn (8)
- # clojure (31)
- # clojure-austin (3)
- # clojure-greece (4)
- # clojure-spec (11)
- # clojure-uk (1)
- # clojurebridge (2)
- # clojurescript (13)
- # cloverage (22)
- # cursive (9)
- # datascript (2)
- # defnpodcast (2)
- # devcards (12)
- # emacs (1)
- # hoplon (67)
- # off-topic (5)
- # om (3)
- # onyx (36)
- # planck (3)
- # quil (2)
- # testing (1)
- # untangled (4)
- # yada (168)
made a little utility lib for boot: https://github.com/borkdude/boot-bundle
@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
@alandipert good idea, sure!
@alandipert already implemented it: https://github.com/borkdude/boot-bundle/commit/44b1d2389584293e3effc6a1f8fd98801607f4ed
@alandipert updated the README to reflect this idea: https://github.com/borkdude/boot-bundle/blob/master/README.md
@borkdude awesome, thanks! I'll definitely use this
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?
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.
@arohner: boot only ever touches the target directory, that's what makes it safe
Well a boot task transforms a fileset
You only see the end result, which gets synced to the target directory
Have a look at the explanation on boot's home page
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?
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'
@arohner so the compiled JS will always end up in your target directory
what you can do is add your resources
dir to :resource-paths
in Boot and have your html served from there
it might take a while getting used to Boot’s concepts, but IMHO it kinda makes sense overall
i.e. Boot will never mutate your project’s directory
^ that make sense?
@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/
so the thing is that you add resources/
to :resource-paths
in Boot’s set-env!
and you serve the HTML & JS from target/
when everything is built
@arohner I’ve recently added Boot support in the Om repo https://github.com/omcljs/om
@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
maybe you can take a look there as an example to follow
@mikebelanger resources definitely get emitted as output
@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 😛
sounds about right, I didn’t understand the first time 🙂
@anmonteiro My mistake - I wasn’t clear
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
Each time I run the task, it crashes on a different file, with a low (<10%) chance of completing without error
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