Fork me on GitHub

When I execute the following in a shell:

clojure -Sdeps '{:deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}}' -m antq.core
I see this warning:
WARNING: When invoking clojure.main, use -M
Is there a way to remove this warning? or is there a problem with the above invocation?


add -M in the front of -m -M -m antq.core


or call antq.core/-main directly using -X -X antq.core/-main


-X is not intended to be used with -main functions since the arg parsing is processed differently


thanks @U04V4KLKC

clojure -Sdeps '{:deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}}' -M -m antq.core
this worked


@U04V4KLKC Just to follow on from Michiel’s point and perhaps clarify for @U051V5LLP: -X invokes a function passing a single hash map as an argument but -main expects a sequence of zero or more strings. As long as -main doesn’t do anything with its & args, you can get away with calling it via -X but that’s an accident of implementation rather than an intended usage.

thanks2 3

Hi all, I was hoping to use node foreman launch a couple of simultaneous clojure processes in development, but it seems there's some concurrency issues when working with a project with remote git coordinates. If two clojure processes try to clone/checkout the same git coordinate concurrently, they run into problems. The workaround is to resolve concurrency by manually launching processes, giving one process a chance to locally clone git first. My question is: is this a reasonable expectation of the clojure deps tooling? Or might this be considered an issue?

Alex Miller (Clojure team)15:04:21

are you using the latest version of clojure?

Alex Miller (Clojure team)15:04:19

prior to, we were using jgit. as of, we're shelling out to git, so these are completely different tool sets with different behaviors. when shelling out to git, you're really asking, can git support multiple concurrent clones/checkouts and the answer is generally yes due to how git uses lock files


I'm using Clojure CLI version

Alex Miller (Clojure team)15:04:43

ok, so my follow up would be more precisely you are seeing the issue - is it in git clone of the repo or getting the working tree (it actually doesn't use git checkout, but rather git worktree)

Alex Miller (Clojure team)15:04:03

and also what git --version you're on


git version 2.20.1 (Apple Git-117)

Alex Miller (Clojure team)15:04:33

you can set GITLIBS_DEBUG=true to see all the commands being run

Alex Miller (Clojure team)15:04:47

if that helps narrow it down

Alex Miller (Clojure team)15:04:08

when you see "problems", what does that look like?


Thanks @alexmiller, I believe I've seen more than one related error message, sometimes related to a git lock file, other times a error: cannot lock ref


Other times a files already exists message

Alex Miller (Clojure team)15:04:30

would love to see those. might be something I can detect/retry or otherwise work with


Ok, I can try to reproduce a number of those messages with the GITLIBS_DEBUG set, is this place to follow up or would you prefer somewhere else?

Alex Miller (Clojure team)15:04:28 is probably the best to file that

👍 3