FWIW, I ran into a similar situation later today @alexmiller but I wasn't able to nail down a repro. In the end, I blew away ~/.gitlibs
and that fixed it. Here's the output from one of my attempts:
Checking out: <https://github.com/seancorfield/depstar> at ee2badaaf4b26754f903ed92e77fd4e82cf2ed70
Error building classpath. Manifest type not detected when finding deps for com.github.seancorfield/depstar in coordinate {:git/url "<https://github.com/seancorfield/depstar>", :sha "ee2badaaf4b26754f903ed92e77fd4e82cf2ed70"}
And that checked out folder was empty.And with a different SHA -- same result:
(! 806)-> clojure -X:jar
Checking out: <https://github.com/seancorfield/depstar> at a8cf78c9e09e3504e64fc77bcb133a7ada39a68f
Error building classpath. Manifest type not detected when finding deps for com.github.seancorfield/depstar in coordinate {:git/url "<https://github.com/seancorfield/depstar>", :sha "a8cf78c9e09e3504e64fc77bcb133a7ada39a68f"}
The only odd thing is that this line was missing when it failed:
Cloning: <https://github.com/seancorfield/depstar>
but present when it worked.Just a follow-up note: in the main channel, you indicated that the problem might be due to prior parallel jgit downloads causing corruption but these SHAs were new since I moved to 1.10.2.801 -- are you saying that the jgit impl could have messed things up in the ~/.gitlibs
folder such that it causes problems for the new git-sh impl @alexmiller?
Hi, I just upgraded to the latest version. I used to setup my test runner like this
:runner {:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.0.641"}}
:main-opts ["-m" "kaocha.runner"]}
this now gives my deprecation warnings
❯ clj -A:test:runner --focus unit
WARNING: When invoking clojure.main, use -M
but after reading the docs I am not sure how to address them@sofra Use clj -M:test:runner --focus unit
With the introduction of -X
for function execution, -M
has been expanded from just :main-opts
to include deps/paths as well and is how you should run anything relying on clojure.main
(`:main-opts`). -A
is going to be reserved for starting a REPL in due course (but still functions as before, except with that warning).
thanks @seancorfield for the explanation
I had tried with -M
instead of -A
but it seems to look for the kaocha.runner
as a file on the file system then
❯ clj -M:test:runner --focus unit
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
kaocha.runner (No such file or directory)
I think kaocha is looking for a config file?
No.
@sofra I just created a brand new project and put this in it:
:aliases
{:test {:extra-paths ["test"]
:extra-deps {org.clojure/test.check {:mvn/version "1.1.0"}}}
:runner {:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.0.641"}}
:main-opts ["-m" "kaocha.runner"]}
...}
and it works fine for me:
$ clojure -M:test:runner --focus unit
[(F)]
Randomized with --seed 150177492
FAIL in sofra.example-test/a-test (example_test.clj:7)
FIXME, I fail.
Expected:
0
Actual:
-0 +1
1 tests, 1 assertions, 1 failures.
I think perhaps you changed your :main-opts
?
That's with the latest prerelease:
$ clojure --version
Clojure CLI version 1.10.2.801
but I can try it with the latest stable version...hmmm, thanks … my bad, it does seem to work now, not sure what it was
yeah strange, sorry for the noise, it is working 🙂
(I just double-checked it works with 1.10.2.790 as well)
cool