This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-18
Channels
- # announcements (4)
- # babashka (13)
- # beginners (8)
- # chlorine-clover (1)
- # cider (5)
- # clj-http (12)
- # clojure (157)
- # clojure-dev (14)
- # clojure-europe (26)
- # clojure-nl (2)
- # clojure-norway (69)
- # clojure-uk (6)
- # clojuredesign-podcast (21)
- # clojurescript (7)
- # core-async (4)
- # datomic (170)
- # editors (1)
- # hyperfiddle (45)
- # java (7)
- # joyride (1)
- # leiningen (43)
- # lsp (7)
- # malli (24)
- # music (1)
- # off-topic (22)
- # pathom (16)
- # portal (31)
- # re-frame (1)
- # releases (1)
- # shadow-cljs (36)
- # squint (4)
I am struggling with installing https://cljdoc.org/d/lambdaisland/kaocha/1.87.1366/doc/2-installing and https://github.com/weavejester/environ in the same build. I am following the directions but it seems my Kaocha installation is being ignored, what am I doing wrong?
(defproject server "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url " "}
:dependencies [[org.clojure/clojure "1.11.1"]
[com.github.seancorfield/honeysql "2.5.1103"]
[environ "1.2.0"]
[clj-http "3.12.3"]
[clj-time "0.15.2"]
[cheshire "5.12.0"]
[org.clojure/tools.reader "1.3.7"]
[net.clojars.wkok/openai-clojure "0.14.0"]
[io.pinecone/pinecone-client "0.7.2"]
[ring/ring-core "1.11.0-alpha1"]
[ring/ring-jetty-adapter "1.8.2"]
[compojure "1.7.0"]
[ring-cors "0.1.13"]
[ring-json-response "0.2.0"]
[com.taoensso/timbre "6.3.1"]]
:main ^:skip-aot server.core
:plugins [[lein-environ "1.2.0"]]
:target-path "target/%s"
:aliases {"kaocha" ["run" "-m" "kaocha.runner"]}
:profiles {:uberjar {:aot :all
:jvm-opts ["-Dclojure.compiler.direct-linking=true"]}
:dev [:project/dev :profiles/dev]
:project/dev {:dependencies [[lambdaisland/kaocha "1.87.1366"]]}})
Am I? following is instructions for environ (dark) and Kaocha (light), am I misreading that they're both talking about Leiningen/project.clj?
Sorry, it has been a long time since I've used lein now, and just saw the alias key and thought that didn't belong
@U05D3EAA6FM how are you trying to run the tests? What command?
You need to specify the :profile/dev
profile
Hmm, no :dev
supposedly pulled that in...
Sorry, been eight years since I used lein
heavily... Profiles were always a weird area...
Maybe @U45T93RA6 can help you when he is around...
❯ lein with-profile +project/dev classpath
Warning: profile :profiles/dev not found.
I did this and it shows kaocha being downloaded and also on the classpathand then i just ran lein kaocha
and it worked
❯ lein kaocha
Warning: profile :profiles/dev not found.
WARNING: Did not load a configuration file and using the defaults.
This is fine for experimenting, but for long-term use, we recommend creating a configuration file to avoid changes in behavior between releases.
To create a configuration file using the current defaults and configuration file location, create a file named tests.edn that contains '#kaocha/v1 {}'.
WARNING: In :test-paths, no such file or directory: test
WARNING: No tests were found. This may be an issue in your Kaocha test configuration. To investigate, check the :test-paths and :ns-patterns keys in tests.edn.
using your project.clj file but with all the deps removed. I added environ back in and it still “worked” except it gave an error because environ brought in clojure 1.8 and kaocha requries 1.9+
❯ lein kaocha
Warning: profile :profiles/dev not found.
ERROR: Kaocha requires Clojure 1.9 or later.
And then adding Clojure 1.11.1 it works (no tests are found)do you have a file at ~/.lein/profiles.clj
? I’m not sure how multiple :dev
profiles are merged, but perhaps you have one in <project>/profiles.clj
or ~/.lein/profiles.clj
and it’s clobbering?
$ lein kaocha --version
Can't find 'kaocha.runner' as .class or .clj for lein run: please check the spelling.
Execution error (FileNotFoundException) at user/eval140$fn (form-init14676761731919941110.clj:1).
Could not locate kaocha/runner__init.class, kaocha/runner.clj or kaocha/runner.cljc on classpath.
Full report at:
/var/folders/2p/5wjfhyyd6zqc9qw_gq9f1zx80000gn/T/clojure-12318744842917680805.edn
can you make a new directory in your /tmp
directory called check
and make the file /tmp/check/project.clj
with these contents:
(defproject server "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url " "}
:dependencies [[environ "1.2.0"]
[org.clojure/clojure "1.11.1"]]
:main ^:skip-aot server.core
:plugins [[lein-environ "1.2.0"]]
:target-path "target/%s"
:aliases {"kaocha" ["run" "-m" "kaocha.runner"]}
:profiles {:uberjar {:aot :all
:jvm-opts ["-Dclojure.compiler.direct-linking=true"]}
:dev [:project/dev :profiles/dev]
:project/dev {:dependencies [[lambdaisland/kaocha "1.87.1366"]]}})
and then run lein kaocha
This setup works on my machine. And perhaps that can tell us. Also would love the full output of lein classpath
$ vim /tmp/check/project.clj
$ lein kaocha --version
Can't find 'kaocha.runner' as .class or .clj for lein run: please check the spelling.
Execution error (FileNotFoundException) at user/eval140$fn (form-init17859507483933356489.clj:1).
Could not locate kaocha/runner__init.class, kaocha/runner.clj or kaocha/runner.cljc on classpath.
Full report at:
/var/folders/2p/5wjfhyyd6zqc9qw_gq9f1zx80000gn/T/clojure-2284241369372617117.ed
$ lein kaocha --version
Warning: profile :profiles/dev not found.
WARNING: Did not load a configuration file and using the defaults.
This is fine for experimenting, but for long-term use, we recommend creating a configuration file to avoid changes in behavior between releases.
To create a configuration file using the current defaults and configuration file location, create a file named tests.edn that contains '#kaocha/v1 {}'.
lambdaisland/kaocha "1.87.1366"
i’m confused. where did you run lein kaocha
for the /tmp/check
one? Why didn’t you run it from that directory
I am not sure I am getting this right. I ran lein kaocha
twice, once from /tmp/check
, and once from the project directory ~/Dropbox/modeldiplomat/server
. The former resulted in Warning: profile :profiles/dev not found
, and the latter resulted in Can't find 'kaocha.runner' as .class or .clj