tools-deps

2023-08-27T19:26:40.679249Z

I'm trying to create a new project with clj-new. In ~/.clojure/deps.edn [copied from practicalli] .. the exec fn looks like this

:project/new
  {:replace-deps {com.github.seancorfield/clj-new {:mvn/version "1.2.399"}}
   :exec-fn      clj-new/create
   :exec-args    {:template app :name practicalli/playground}
   :main-opts    ["--main" "clj-new.create"]}
The following command does not work
clj  -M:project/new :template lib :name mygroup/myproject
The following does
clj -M:project/new lib mygroup/myproject
But as per https://clojure.org/reference/deps_and_cli I should be using
clj  -M:project/new :template lib :name mygroup/myproject
to override arguments Any thoughts on what's going wrong?

Alex Miller (Clojure team) 2023-08-27T20:04:26.942509Z

"does not work" == ?

Alex Miller (Clojure team) 2023-08-27T20:04:58.155899Z

if you're using :exec-fn and :exec-args, then those are only used with clj -X

Alex Miller (Clojure team) 2023-08-27T20:05:35.593249Z

perhaps you just need to s/-M/-X/

2023-08-27T20:08:10.859629Z

I see. Let me try it out. Thks!

seancorfield 2023-08-27T20:55:57.174429Z

@rdsr You might want to look at the clj-new documentation itself: https://github.com/seancorfield/clj-new

1
practicalli-johnny 2023-08-28T13:26:22.968519Z

The alias is working correctly when the appropriate argument types and execution option is used -M uses string arguments -X uses key value pair arguments Unless a specific Leiningen template is required, I suggest using the deps-new project. Practicalli Clojure CLI Config defines the :project/create alias to use this project, which also includes additional templates https://practical.li/clojure/clojure-cli/projects/templates/

1
2023-08-28T20:08:07.340409Z

@jr0cket thks yes that was my experience as well as u specified.