This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-26
Channels
- # aleph (3)
- # beginners (98)
- # boot (24)
- # cljs-dev (13)
- # cljsrn (16)
- # clojure (97)
- # clojure-dusseldorf (2)
- # clojure-italy (2)
- # clojure-losangeles (2)
- # clojure-russia (48)
- # clojure-spec (28)
- # clojure-uk (79)
- # clojurescript (79)
- # community-development (2)
- # cursive (4)
- # datomic (35)
- # duct (1)
- # events (1)
- # fulcro (43)
- # heroku (1)
- # jobs (1)
- # lein-figwheel (2)
- # luminus (1)
- # lumo (12)
- # nyc (1)
- # off-topic (6)
- # om (1)
- # pedestal (7)
- # portkey (9)
- # proton (1)
- # re-frame (45)
- # reagent (27)
- # rum (2)
- # shadow-cljs (78)
- # spacemacs (3)
- # specter (2)
- # testing (2)
- # vim (41)
if I have a task workflow adorned by watch
, is it possible to run something when that watch gets killed? i.e. When user presses Ctrl-C I want to run a sh command...
@ag returning identity would cause this problem. With pass thru is the correct solution
If I'm wanting to use boot.lein/generate
so I can use Cursive in IntelliJ ( https://github.com/boot-clj/boot/wiki/For-Cursive-Users ) is there any way I can make that run automatically before any other boot command without adding stuff to build.boot
?
I've got a load of shared boot jobs and I don't really want to add the library to all of them when I'm the only Cursive user, but when I tried putting the calls into my profile.boot
it of course loaded and ran than before build.boot
, so I didn't have any of my libs in the generated project.clj
So what do I need to put in there so that it runs those commands after loading the project-specific build.boot
and thus has the right libs reference?
Normally I just run whatever command I need for the project directory containing the build.boot
file. So boot test
on the command line or whatever
add this to profile.boot:
(set-env! :dependencies '[[onetom/boot-lein-generate "0.1.3" :scope "test"]])
(require 'boot.lein)
(boot.lein/generate)
Then you can do: boot boot.lein/generate test
insteadException in thread "main" java.lang.NoClassDefFoundError: com/stuartsierra/component/Lifecycle
#!/usr/bin/env boot
(set-env!
:source-paths #{"src" "dev"}
:resource-paths #{"resources"}
:dependencies '[[org.clojure/clojure "1.8.0"]
[com.stuartsierra/component "0.3.2"]
[liberator "0.14.1"]
[yada "1.2.6"]
;; [onetom/boot-lein-generate "0.1.3" :scope "test"]
[org.clojure/tools.namespace "0.2.11"]
[org.clojure/core.async "0.3.443"]
])
;; (require 'labs-server.core)
;; (require 'boot.lein)
(task-options!
pom {:project 'labs-server
:version "0.1.0"}
aot {:namespace #{'labs-server.core}}
jar {:main 'labs-server.core
:file "labs-server.jar"}
target {:dir #{"target"}})
(deftask build
"Build uberjar"
[]
(comp
(aot)
(pom)
(uber)
(jar)
(target)))
(deftask labs
"Run this server locally and reload file changes"
[p port VAL int "Set the repl port"]
(require 'labs-server.core)
(let [run-server (resolve 'labs-server.core/-main)] (run-server))
(repl :port (or port 9999)))
I’ve done some googling and tried putting :gen-class in each file that uses component
setting the aot :namespace manually to include component too.. it’s quite confusing to be honest!
mikepjb how are you running the uberjar?
@mikepjb you need to make sure that you're requiring com.stuartsierra.component before the :import runs
can you share a redacted version of the file where the exception is coming from?