Skip to content

Clojure CLI toos - new features and breaking changes #259

Open
@practicalli-johnny

Description

@practicalli-johnny

#announcments in Clojurians slack

https://insideclojure.org/2020/07/28/clj-exec/

A new prerelease version of clj is now available (1.10.1.672):
See release notes here with detail
-X now supports multiple aliases, aliases with other argmap options like :extra-deps, and ad hoc functions
new argmap alias keys :ns-default and :ns-aliases can be supplied to make using ad-hoc functions simpler
-M is now used to invoke clojure.main, also supports aliases with other argmap options
-P is a new option to "prepare" your execution (download deps, cache classpath etc, but not exec) - useful for dryrun-esque capability particularly when preparing containers etc
-R, -C, -T, -O have been removed (use -X, -M or -A for repl invocation instead)
argmap keys :deps/:paths have been renamed to :replace-deps/:replace-paths (old will still work in deprecated mode for a while, but not forever)
argmap keys for -X :fn and :args were renamed to :exec-fn and :exec-args
-Stree, -Spom, and -Sresolve-tags are now programs you invoke with -X on the built-in :deps alias: -X:deps tree, -X:deps mvn-pom, -X:deps git-resolve-tags Also, the mvn local install program is now similar -X:deps mvn-install. These are all leveraging the new :ns-default arg.
Docs for all this stuff can be found in a prerelease version of the reference doc which will exist until this is the next stable version, hopefully soonish
Feedback welcome in #tools-deps before this gets promoted to stable!

Review discussion about changes in Clojurians slack
https://clojurians.slack.com/archives/C6QH853H8/p1599239173159500

Review change log and develop pre-release versions
https://github.com/clojure/tools.cli

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions