Add switch for `clojure --version`

Description

Clojure should support the `--version` and `-v` switches that are nearly universal among software tools.

Suggested output is EDN format:

{:version {:clojure "1.10.1-beta1" :java "Java 12"}}

Environment

None

Activity

Show:
Alex Miller
May 8, 2019, 6:21 PM

If going the data route, clojure-version already has a data format:

and Java has it's own equivalent buried in the Java system properties.

However, seems like first step is to consider whether the primary consumer of this is people or programs. It would be very useful for error reporting, but people would be fine for that. Programs can already emit data by using

etc.

Andy Fingerhut
May 8, 2019, 6:27 PM

It seems possibly useful, besides the Clojure and Java versions, to also report a version number for the clojure/clj program itself, which is independent of the other version numbers?

Alex Miller
May 8, 2019, 6:32 PM

We already have support for stuff like that in clj -Sdescribe and clj -Sverbose, so I'm going to say clj tool itself is out of scope here.

Assignee

Unassigned

Reporter

Alan Thompson

Labels

Approval

None

Patch

None

Affects versions

Priority

Trivial