Fork me on GitHub
#tools-deps
<
2021-12-18
>
practicalli-johnny15:12:39

I'm writing a few introductory articles on Clojure CLI tools to help people get started (and as a refresh for myself) I would appreciate any https://github.com/practicalli/blog/pull/105 before I publish them to the production blog https://practical.li/blog-staging/posts/clojure-cli-tools-understanding-aliases/ https://practical.li/blog-staging/posts/clojure-which-execution-option-to-use/ (I have a few tweaks to do with the section on -T tools)

Chase18:12:06

Seems like good intros to me. The current simple-api-server project is bit out of sync with the docs but it's super minor (the article describes using depstar to build an uberjar but the project template has now switched to build-clj). Maybe a mention that the created template project shows examples of how to use the aliases in the created readme would help some who are hands on explorers.

Chase18:12:30

Maybe an explanation of what to do if your -main function takes any arguments would be nice.

Chase18:12:52

I'm also still unclear on what :main-opts could be.

Chase18:12:08

So any function called using -X or with :exec-args has to take a map in as it's only argument right? So is there anyway to run an arbitrary function without that requirement?

Alex Miller (Clojure team)14:12:31

sorry, just getting around to reading these. some notes on https://practical.li/blog/posts/clojure-which-execution-option-to-use/: • -A is not deprecated (it's the only way to provide aliases when starting a repl) • git-resolve-tags should be considered deprecated (doesn't really make sense with the new git support), might just be better not to mention it as I plan to remove it • In addition to clojure --help you can also man clojure - over time man is likely to grow more expansive than the short help • "directive providing a specific name for the too" - typo at the end • clojure -M:project/hotload:env/dev:lib/cider -P - this won't work, -M -X and -T all scarf all subsequent arguments, so you need clojure -P -M:project/hotload:env/dev:lib/cider

Alex Miller (Clojure team)15:12:21

filed an issue with the above for tracking

practicalli-johnny13:12:28

Fixed, thank you. I was a little confused about -A, but then though of an example, so added a specific section about -A to clarify I use Rebel Readline to run an interactive REPL in a terminal, so haven't used the -A option in a long time.