tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
p-himik 2021-01-25T00:13:45.038Z

Is the WARNING: When invoking clojure.main, use -M warning supposed to be printed even when executing just clj -e 1?

p-himik 2021-01-25T00:19:25.038200Z

Or when I'm running my own -main, like in clj -m my.proj.

alexmiller 2021-01-25T01:03:33.038400Z

yes, and yes

alexmiller 2021-01-25T01:04:13.038600Z

-M (now) means "run clojure.main" so should be used with -m or -e or calling a script.clj etc

p-himik 2021-01-25T01:12:06.038800Z

Ah, I see. I thought it was only for aliases but now I can see that the list of aliases is optional. And I didn't realize that clojure.main is called even when I specify -m. Thanks!

lepistane 2021-01-25T09:35:42.040200Z

Hello this is super basic question. I create simple command line program which i would like to execute. I used https://www.clojure.org/guides/deps_and_cli#_writing_a_program as a reference but i have a problem. i have `deps.edn` , `src/data.clj` that has fn `foo`, and when i do `clj -X data/foo` i get this error

Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
-X (No such file or directory)
Full report at:...
what am i doing wrong?

borkdude 2021-01-25T09:39:21.040500Z

@lepistane Probably a too old version of clj

lepistane 2021-01-25T09:48:04.040600Z

another basic question :S how do i remove clojure cli from my machine?

lepistane 2021-01-25T12:17:30.040900Z

this worked! i just repeated installation steps thanks!!

seancorfield 2021-01-25T18:42:48.041400Z

@lepistane I've found it helpful to use brew to manage my Clojure CLI install even on Linux, so that I can choose to install a specific version and also make it easy to keep the CLI up-to-date.

👍 1