Fork me on GitHub
#boot
<
2018-04-15
>
Drew Verlee19:04:08

so i’m trying to understand what boot means when it says +input and +output based on this: https://github.com/boot-clj/boot/wiki/Boot-Environment. What makes the subject somewhat confusing is the definition of source-paths: > A set of path strings. These paths will supply the content that will be on the classpath of the initial Fileset, and the files contained will be marked with roles +INPUT,-OUTPUT, so they may be used to generate output but will not themselves be emitted as final artifacts. I would assume the output of a boot So i would expect files we by convention put under src/ to be -Input : the clj files are used to generate the output the .class files and then files but not included themselves. But, and i assume i’m wrong here, this isnt what clj-new does: boot.build produced by clj-new: :resource-paths

(set-env! :resource-paths #{"resources" "src"}
          :source-paths   #{"test"}
          :dependencies   '[[org.clojure/clojure "RELEASE"]
                            [adzerk/boot-test "RELEASE" :scope "test"]])
It puts src/ under the resource path: > A set of path strings. These paths will supply the content that will be on the classpath of the initial Fileset, and the files contained will be marked with roles +INPUT,+OUTPUT and so be emitted as final artifacts. Which is extra confusing because thats the opposite of what this example project does. This example puts the .clj files in the source path: :source-paths #{"src/clj" "src/cljc" "src/cljs"} https://github.com/oakes/full-stack-boot-example/blob/master/build.boot i’m i correct in assuming that if you put .clj files in in your boot resource-path then those files (and their complied bytecode equivalents are put into the jar file?

juhoteperi19:04:29

@drewverlee In the example aot task is used to compile all Clojure into Java bytecode and no Clj code is put into the jar file

juhoteperi19:04:04

AOT can reveal problems in some libs so I wouldn't recommend it, at least when saving few seconds on the startup isn't that important

Drew Verlee19:04:19

@juhoteperi ah ok. Do you have any idea what it means by > so they may be used to generate output but will not themselves be emitted as final artifacts. I think this is the last bit that isn’t clear to me

juhoteperi19:04:38

aot task (or cljs) read the files with input role (source, resources) and can create files with output role (i.e. Cljs source has only input role but Cljs creates output file with output role)

juhoteperi19:04:52

the files created by the task are part of the artifact, but original files are not