This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-24
Channels
- # aws (7)
- # aws-lambda (3)
- # beginners (65)
- # boot (43)
- # cider (7)
- # cljs-dev (12)
- # cljsrn (15)
- # clojure (284)
- # clojure-austin (32)
- # clojure-brasil (4)
- # clojure-dusseldorf (4)
- # clojure-germany (1)
- # clojure-italy (40)
- # clojure-spec (21)
- # clojure-uk (69)
- # clojurescript (97)
- # core-async (11)
- # cursive (19)
- # data-science (1)
- # datascript (6)
- # datomic (30)
- # dirac (2)
- # emacs (4)
- # events (2)
- # fulcro (76)
- # graphql (38)
- # juxt (1)
- # lein-figwheel (1)
- # leiningen (6)
- # luminus (4)
- # lumo (13)
- # mount (4)
- # off-topic (24)
- # om (28)
- # onyx (32)
- # other-languages (1)
- # parinfer (40)
- # pedestal (1)
- # portkey (47)
- # re-frame (21)
- # reagent (4)
- # ring (4)
- # ring-swagger (3)
- # rum (1)
- # shadow-cljs (115)
- # spacemacs (5)
- # sql (14)
- # unrepl (1)
- # yada (3)
I mean this: https://github.com/clojure/clojure/blob/2e0c0a9a89ede8221504edeb90e8c4ee6cce7e16/src/clj/clojure/test.clj#L756
hi all, i'm trying to run my boot project which requires the sparkling library by gorillalabs. my boot run task: (deftask run "Run the service in an embedded Jetty server." [] (set-env! :resource-paths #(conj % "env/dev/resources")) (set-env! :source-paths #(conj % "env/dev/clj")) (comp (filter-resources) (with-pass-thru _ (require 'classification-server.core :reload-all) ((resolve 'classification-server.core/-main))) (wait))) and i get java.lang.ClassNotFoundException: sparkling.serialization.Registrator org.apache.spark.SparkException: Failed to register classes with Kryo the documentation suggests adding :aot [#".*" sparkling.serialization sparkling.destructuring] but when i add (task-options! aot {:namespace #{'classification-server.core 'sparkling.serialization 'sparkling.destructuring}} ... i get no further
i have tried including the (aot) task in my run task to no avail
any ideas?
ben.mumford the problem might be related to the fact that classes generated during AOT are not added to the classpath that the kryo stuff runs in
so, question 2. how do i do that?
i think it depends on how much you want to learn about boot and classpaths today :-)
...and kryo
the basic idea is, set up the classpath of a pod and then run your code inside the pod instead of at "the top level"
https://github.com/alandipert/boot-trinkets/blob/master/src/alandipert/boot_trinkets.clj is an example of a similar thing. that run
task is for when i have javac in my pipeline, and i want to continuously run the main method of some compiled class
an advantage of the pod way is that you're kind of running your code "containerized" in these pods, and you can add/remove/change code and not need to restart boot
the disadvantage is you need to switch to an "application oriented" style where you move away from a REPL and toward an entrypoint function that you run
personally though, if it were me, i would punt on boot and use whatever the gorillalabs people recommend
lein i suppose? kryo and its clj wrappers do some wild stuff that has challenged my understanding of java in the past
full disclosure, the last time i did spark stuff, i gave up on clj entirely and regressed to intellij/scala
(and it worked out pretty well)
yeah i'd like to stick to boot if possible, all our other applications use boot and i can run the uberjar once built but just not my little boot run command
seems silly to have lein for one project and boot for everything else
i thought that originally too, but spark changed my outlook
one way you could simplify your job if you want to stick with boot is just focus on getting the uberjar working, not worry about the run task
then you could e.g. boot watch build in one terminal and run the uberjar continuously in another, like with the entr
command + java
the major simplification there is the reasoning about pods and classpaths... to just worry about what's in the jar
yeah the jar works fine. i might experiment with the watch thing
is there a way to get boot, under cljs :optimizaions :all, to, instead of writing to main.js, write to main_timestamp.js ? I am running into cloudfront + aws caching issues; and if I got my js files named main_timestamp.js, things would work better
this line here currently writes the output out to main.js:
(cljs :ids #{"main"}
:optimizations :advanced
:compiler-options {:source-map-timestamp true})
question: is there a way to configure this to write it out to
(format "main_%d.js" (timestamp)) ?
due to caching / work flow reasons, I want each main_.js to have a different timestampI've got the timestamp part setup;I now need to do a "move main.js main_timestamp.js" -- how do I execute this as a boot task ?
We just call
to copy files around in our Boot tasks.
(and there's
to clean up after)
(deftask rename-mainjs []
(boot.core/with-pre-wrap fileset
(io/copy (io/file "main.js") (il/file "foo.js"))))
(comp ...
(cljs :ids #{"main"}
:optimizations :advanced
:compiler-options {:source-map-timestamp true})
(rename-mainjs)
...)
this doesn't seem to work since the cljs-task writes stuff ot fileset right ?Hi folks, how do I exit-error
a script cleanly, without printing the stacktrace? The only thing I can find is https://github.com/boot-clj/boot/issues/405 which kinda says the issue is solved but I don't understand how.
@alexyakushev I don't believe you can. That's just part of Boot's "charm"... 🙂
That's quite charming 😄
It is possible 🙂
(throw (ex-info "..." {:boot.util/omit-stracktrace? true})
@juhoteperi Thanks, but it still prints the stacktrace for me:(
Boot.main Boot.java: 258
...
boot.App.main App.java: 491
boot.App.runBoot App.java: 399
org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke ClojureRuntimeShimImpl.java: 150
org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke ClojureRuntimeShimImpl.java: 159
...
boot.main/-main main.clj: 206
boot.main/-main/fn main.clj: 206
...
boot.user/eval1138 boot.user7227065426553824320.clj: 35
...
boot.user/eval1116/fn boot.user7227065426553824320.clj: 31
clojure.core/apply core.clj: 646
...
boot.user/eval1094/fn boot.user7227065426553824320.clj: 27
...
boot.user/eval1033/fn boot.user7227065426553824320.clj: 23
boot.user/exit-error-clean boot.user7227065426553824320.clj: 19
clojure.core/ex-info core.clj: 4617
clojure.lang.ExceptionInfo: Some tests have failed.
boot.util/omit-stracktrace?: true
clojure.lang.ExceptionInfo: Some tests have failed.
file: "/tmp/boot.user7227065426553824320.clj"
line: 35
@alexyakushev I've never been able to get that to work either /cc @juhoteperi