This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-24
Channels
- # arachne (1)
- # bangalore-clj (11)
- # beginners (177)
- # boot (63)
- # business (1)
- # cljsjs (21)
- # cljsrn (3)
- # clojars (4)
- # clojure (116)
- # clojure-art (4)
- # clojure-belgium (3)
- # clojure-india (1)
- # clojure-italy (6)
- # clojure-russia (14)
- # clojure-spec (8)
- # clojure-uk (67)
- # clojurescript (51)
- # community-development (5)
- # cursive (13)
- # datascript (14)
- # datomic (29)
- # devcards (3)
- # emacs (3)
- # events (3)
- # funcool (4)
- # hoplon (29)
- # mount (6)
- # om (34)
- # om-next (5)
- # onyx (16)
- # perun (8)
- # planck (22)
- # re-frame (13)
- # reagent (5)
- # ring-swagger (21)
- # rum (3)
- # spacemacs (3)
- # specter (1)
- # untangled (39)
Why do I get a file not found exception when I’m running boot repl and try require my file?
I run boot repl from root of dir and my file has namespace mappr.core which lives in src
it's src/mapper/core.clj? Should be (require 'mapper.core)
I’m tripping over some boot basics and thought I’d ask here … basically I’m trying to get a simple “hello world” app going and it’s a pretty frustrating experience
(require 'boot.repl)
(set-env!
:resource-paths #{"src"}
:dependencies '[[org.clojure/clojure "1.8.0" :scope "provided"]])
(task-options!
pom {:project 'bernhard
:version "1.0.0"}
jar {:main 'bernhard.core}
aot {:all true})
(deftask build []
(comp
(javac)
(pom)
(uber)
(jar :main 'bernhard.core)
(sift :include #{#"project.jar"})
(target :dir #{"target"})))
then in src/bernhard/core.clj I have a -main function defined exactly as I would with leiningen
but
boot build ; java -jar target/project.jar
always tells me that bernhard.core can’t be found@hagmonk you're never calling the aot
task
looks like you need (aot)
somewhere in your comp
before jar
pro tip: boot repl
and then (load-file "build.boot")
every time you change it, then you can call (boot)
at repl after changes instead of waiting for boot to start. good for debugging build.boot problems like this
or rather, (boot (build))
@alandipert its just “mappr.core” (no ‘e’ in it cause I’m so trendy 😉 )
ooh it's a cljs file? are you using the cljs repl? that stuff is harder to get working
boot is a clj thing, so in boot's default repl you can't require cljs
hey guys, im a little bit confused as to how exactly i should instruct boot to build a library, rather than running a program that has a main
basically, when i look at the jar it generates using pom jar install, it includes no classes
@lmergen But does it include the .clj files?
you should have src
in :resource-paths
instead of :source-paths
Then the files from that folder are included in output (jar)
as source
Clojure libraries are usually distributed as source
@juhoteperi sweet, that worked! i knew it must've been something simple
@jiyinyiyong not sure but this probably mostly depends on what you tell the JVM to use. You can restrict it more and it will GC more often and use less.
@jiyinyiyong https://github.com/boot-clj/boot/wiki/JVM-Options this should get you started
I'm running into the boot+circleci inotify issue
@nberger I saw you reported this before. Did you ever find a solution?
or is there a way to disable inotify watches in boot? I don't think it's needed for my dist
task
@pesterhazy I don't think there is option for this currently
https://github.com/boot-clj/boot/blob/master/boot/core/src/boot/core.clj#L184-L198 Boot will always use file change watcher to look for changes in source dirs
@juhoteperi I see, thanks
Some kind option to tell Boot that changes don't matter would be useful for CI use case
Cljsjs CI process is running into these errors from time to time
@pesterhazy oh yes, the rebuild button 😕. Got a response from circleci: they analyzed the issue, agreed that the solution is to increase the limit on their side but they are not going to increase it or allow users to do it because not much people was reporting it (seemed like mine was the first report)
yeah I don't blame them
boot does create a lot of watches 🙂
they're awesome indeed
When trying to follow the uberjar example repo recipe, I get an error at the uber
task: manifest.properties (No such file...) Do I need to create this file manually?
One more doubt: is it not possible to make an uberjar with boot without adding a Main.java file, as in the example?
Yeah- use aot and gen class. Iirc I updated example?
Lame, I didn't
But yeah gen class a single clj ns, and in its -main fn require and resolve the clj ns and real main function
That way you don't suffer transitive aot
Same approach is taken in main.java
with lein, I think all the dependency classes are stored in ./target
so where are these dependency classes stored with boot?
Thanks @alandipert, got it working great that way. Couldn't figure out how to name the jar something other than project.jar
but I could live with that.