This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-27
Channels
- # babashka (45)
- # beginners (44)
- # calva (3)
- # cider (14)
- # clara (4)
- # clj-commons (3)
- # clj-otel (4)
- # cljsjs (1)
- # cljsrn (111)
- # clojars (5)
- # clojure (62)
- # clojure-europe (14)
- # clojure-nl (2)
- # clojure-uk (4)
- # clojurescript (31)
- # community-development (16)
- # conjure (7)
- # cursive (9)
- # data-science (1)
- # datalevin (10)
- # docker (1)
- # emacs (20)
- # fulcro (7)
- # helix (10)
- # jobs (4)
- # lsp (22)
- # malli (35)
- # meander (12)
- # music (1)
- # nbb (2)
- # off-topic (5)
- # pathom (3)
- # quil (1)
- # re-frame (12)
- # react (6)
- # reagent (18)
- # releases (1)
- # remote-jobs (1)
- # rewrite-clj (4)
- # ring (1)
- # shadow-cljs (10)
- # spacemacs (9)
- # tools-build (17)
if i was translating a boot build to a tools one, then the equivelent of boot's https://github.com/boot-clj/boot/blob/master/doc/boot.task.built-in.md#aot would be tools build's https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-compile-clj right?
compile-clj: Compile Clojure source to classes in :class-dir.
aot: Perform AOT compilation of Clojure namespaces.
the compiled clojure source to classes that compile-clj produces are aot complied right. That's what the process means as far as i understand:
> Ahead-Of-Time (AOT) compilation allows the compilation of Java™ classes into native code for subsequent executions of the same program
why does clojure.tools.build.api/write-pom "skip" :src-dir value that points to cljc files? that's how i understand this message that's produced when i run the build e.g clj -T:build uber
Skipping paths: src/cljc
write-pom
takes the first path it finds in the basis and treats it as the source directory in pom.xml
and it ignores the second and subsequent paths -- that's what that message is saying.
(mostly it's to ensure you don't have ["resources" "src"]
as your :paths
as I recall)
another question, unrelated to the one above. the logic for the build (what the guide puts in build.clj) isn't on the src path for the projects deps file. Is there a way to send those expressions to a clojure repl so you can do RDD? Maybe it's just a matter of having an alias like "build-dev" and then putting the build logic on a path :extra-paths ["builds"] with builds/build...
@drewverlee You can do :extra-paths ["."]
and launch a repl with the :build
alias
another another question 🙂
The final step/function of my uberjar build fails uber
. I expected to see a <file>.jar on the provided classpath class-directory but there is nothing. There isn't any warnings or errors that i see. I'll post here if i find anything interesting as i try to figure out how to produce the jar correctly.
It's generally going to be in the target
folder unless you've told it somewhere else.
Not sure what you mean by "provided classpath".
i meant to say :class-dir /class-directory
What are you specifying for :uber-file
in your uber
call?
"centriq-web.jar"
Per the guide:
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def uber-file (format "target/%s-%s-standalone.jar" (name lib) version))
The uberjar will be written to the target
folder, not target/classes
.OK, so with just that :uber-file
, you should see it in the root of your project (where you run clojure
from).
correct, that's where it is. ugh
thanks! I should have looked harder, i guess i was just expecting a weirder problem!