This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-25
Channels
- # aws (10)
- # babashka (4)
- # beginners (103)
- # calva (19)
- # chlorine-clover (2)
- # cider (10)
- # cljs-dev (23)
- # cljsrn (6)
- # clojure (145)
- # clojure-europe (17)
- # clojure-nl (1)
- # clojure-spec (11)
- # clojure-uk (4)
- # clojurescript (64)
- # conjure (11)
- # core-async (19)
- # cursive (38)
- # datomic (4)
- # duct (2)
- # fulcro (51)
- # helix (11)
- # joker (1)
- # kaocha (7)
- # leiningen (3)
- # malli (5)
- # meander (3)
- # off-topic (12)
- # pathom (17)
- # pedestal (2)
- # re-frame (27)
- # rum (11)
- # shadow-cljs (77)
- # xtdb (9)
- # yada (1)
How to run kaocha when there is a main-namespace defined in one of the aliases? My kaocha.sh
script looks like this
#!/usr/bin/env bash
clojure -A:shared:server -m kaocha.runner "[email protected]"
and in deps.edn
there is a :main-opts ["-m" "server"]
defined for the server
alias. Now when running the script, the server gets started instead of kaocha
. So the -m
option to clojure
is obviously ignored. Is there a ways without introducing an additional alias in deps.edn
?I think you can use -C:shared:server
instead of -A:
, have a look at clojure --help
. You can control which part of the aliases gets used (extra-paths, mains, deps). -C
will only handle the classpath, -A
does everything
@plexus Thanks, must have overlooked this option, but it seems not to be that easy:
java.lang.IllegalArgumentException: No implementation of method: :as-file of protocol: #' found for class: clojure.lang.PersistentVector
at clojure.core$_cache_protocol_fn.invokeStatic (core_deftype.clj:583)
$fn__11366$G__11348__11371.invoke (io.clj:35)
… will look into that later, not sure what causes this error.hmmm you have a vector somewhere where something is expecting it to be a filename or something similar
Right, there was a typo in my tests.edn
… and using a combination of -C
and -A
did the trick, thanks:
#!/usr/bin/env bash
clojure -A:shared -C:server -m kaocha.runner "[email protected]"