-A deprecation warning even though not used

Description

Invoking

clojure --main cljs.main

with a deps file just declaring a ClojureScript dependency gives:

WARNING: Use of -A with clojure.main is deprecated, use -M instead

Apparently his lead to David Nolen updating all ClojureScript getting started examples to prepend -M and no aliases to --main

clojure -M --main cljs.main

This doesn't work on older versions

I'm raising that issue to question whether this is all intended.

Environment

Version: 1.10.3.855 on linux

Activity

Show:

Alex Miller June 2, 2021 at 4:57 PM

Updated deprecation message for next release to:

WARNING: Implicit use of clojure.main with options is deprecated, use -M

Alex Miller June 2, 2021 at 4:41 PM

I think the warning text is assuming the wrong condition here and I can probably improve that, but the advice to use -M is correct.

Alex Miller June 2, 2021 at 4:32 PM

-M should now be used with any program that calls through clojure.main, so that is correct. The old behavior of running clojure.main by default has been supported since -M was added to the clojure CLI in Sept 2020, but will eventually be removed.

Fixed

Details

Assignee

Reporter

Priority

Created May 31, 2021 at 7:51 PM
Updated January 4, 2022 at 2:41 PM
Resolved June 2, 2021 at 4:57 PM