Fork me on GitHub

Just fyi, I think moving to shell git instead of jsch will probably alleviate this issue as well:


Unless the maven stuff also depends on jsch. If not, then an all native dependency resolution/download might be near.


If you are curious about this, I talk about tools-deps-native here: (start from m37s20)

Alex Miller (Clojure team)14:03:34

maven does not depend on jsch

Alex Miller (Clojure team)14:03:00

moving to git shell will actually drop about 1/4 of the transitive lib weight for clj

🙌 12

anybody figured out workarounds for git deps and Apple M1?


What's the problem on m1?


Maybe the git shell branch is a workaround :) But maybe running under Rosetta is also one?

Spencer Apple17:03:26

Upgrading from to broke this for us:

GRAALVM_HOME=/path/graalvm-ce- clojure -A:native-image
our deps.edn
:aliases {:native-image
           {:main-opts ["-m clj.native-image monorepo.core"
            :jvm-opts [""]
             {:git/url    ""
              :sha        "f3e40672d5c543b80a2019c1f07b2d3fe785962c"
              :exclusions [org.slf4j/slf4j-nop]}}}}
 "Execution error (FileNotFoundException) at (\n-m clj.native-image monorepo.core (No such file or directory)\n",
  :clojure.error/line -2,
  "-m clj.native-image monorepo.core (No such file or directory)",
  :clojure.error/source "",
  :clojure.error/phase :execution},
    "-m clj.native-image monorepo.core (No such file or directory)",
    :at [ open0 "" -2]}],
  [[ open0 "" -2]
   [ open "" 219]
   [ <init> "" 157]
   [ <init> "" 112]
   [clojure.lang.Compiler loadFile "" 7571]
   [clojure.main$load_script invokeStatic "main.clj" 475]
   [clojure.main$script_opt invokeStatic "main.clj" 535]
   [clojure.main$script_opt invoke "main.clj" 530]
   [clojure.main$main invokeStatic "main.clj" 664]
   [clojure.main$main doInvoke "main.clj" 616]
   [clojure.lang.RestFn applyTo "" 137]
   [clojure.lang.Var applyTo "" 705]
   [clojure.main main "" 40]],
  "-m clj.native-image monorepo.core (No such file or directory)"}}


@splayemu "-m clj.native-image monorepo.core" should be three separate strings: "-m" "clj.native-image" "monorepo.core"


I'm a bit surprised it used to work in earlier versions, to be honest.

Spencer Apple18:03:29

Wow thanks! I swear I had tried that but it appears to be working.

Alex Miller (Clojure team)18:03:39

I'm not surprised :)

😄 3

I had never tried :main-opts strings with multiple command-line arguments in because it just never occurred to me that it would work -- all the examples show a separate string for each argument, I believe -- but I'm not surprised it no longer works 🙂


e.g. it splits echo 'foo bar' in "echo" and "foobar"

Alex Miller (Clojure team)22:03:07

I have done a prerelease of the Clojure CLI ( that switches git/ssh to shell out rather than using jgit/jsch. this potentially fixes many existing git/ssh issues in that it is just shelling out to git, so if it works there, it should work through clj. I would love to see any and all tire-kicking on this: • public https repos • https repos with user/pw auth (not previously supported, subject to whatever credentials you have set up through git) • private ssh git repos • newer key exchange methods like ecdsa-sha2-nistp256 • .ssh/config options that didn't work before • ed25519 identity keys • concurrency issues in parallel downloads (I think this is improved but I never had a working repro for it) • doesn't work on M1 macs • Windows • CI systems like Travis/Circle/etc when you're testing, don't forget that a) git dirs and working trees are cached in ~/.gitlibs - consider selectively clearing/moving that while testing), and b) classpaths are cached in .cpcache dirs - use clj -Sforce to force that to override

🎉 36
Alex Miller (Clojure team)22:03:55

there are still a couple more things I need to do here. currently, tools.gitlibs defaults to non-interactive behavior so it will not prompt you if, for example, hosts are not in known_hosts, it will just fail. there is a flag in the API to support that, but I have not pulled that through the whole stack yet - it can be selectively interactive (and should be if you're just sitting at the terminal I think)


Exciting! Bumped at Native compilation only takes 1m40s on CI which is really good: an indication that this project is now much more light weight.

Alex Miller (Clojure team)23:03:09

yeah, the brew tarball went from like 19M to 15M

👍 3