Fork me on GitHub
practicalli-johnny11:09:14 is a refactor of the project wide aliases in light of the changes coming in Clojure CLI tools (version onwards). This will go live when the Clojure CLI changes go live. The aliases are using the -X flag for executing functions and providing default hash-map arguments (where the library supports this) and using -M flag for clojure-main (replacing -A and -R). Where chained aliases in a command have multiple main namespaces, the alias that should have its main run is added last in the chain. Alias namespaces have been upgraded to be qualified names, further defining their purpose and making them easy to understand without looking at the details (at least that is the intent). contains notes to be added to the Practicalli Clojure book on using the Clojure CLI tools with the recent changes. Any feedback on this is welcome, especially on how clear an accurate this is. Thank you.

Alex Miller (Clojure team)13:09:22

-P can be used with -X too

Alex Miller (Clojure team)13:09:58

re "The order in which repositories are consulted is not guaranteed", recently I changed this to actually guarantee that the first two repos consulted are central and clojars (no guarantee after that). central and clojars are listed in the root deps.edn so do not need to be added to deps.edn or settings.xml unless you add mirrors etc.

👍 3
Alex Miller (Clojure team)13:09:16

"`business-area**" looks like bad markup

Alex Miller (Clojure team)13:09:26

the automatically included "central" and "clojars" repos can be removed from consideration by nil'ing them in deps.edn {:mvn/repos {"central" nil}}

👍 3

curl -O 
chmod +x
sudo ./
Version is not correct in that last line.


Run project with or without an alias:

`clojure -M:alias -m`
`clojure -M -m
` Looks like you have extra backticks in that code block.


:project/outdated-mvn - check for newer dependencies (maven only) The other two lines above this have the alias as code (with backticks) but this third one does not.

seancorfield17:09:11 I think it would be better to use CURRENT instead of a specific version there, unless you plan to ensure that you update the README any time you update the next.jdbc version used in any of your aliases?

❤️ 3

clojure -M:inspect/portal-cli ClojureScript node.js REPL with Portal dependency That should be :inspect/portal-node


Add Reveal as tap> source I thought Reveal did that automatically? I don't recall having to do this manually when I've used Reveal. Depends on how you start it. If you start it with vlaaad.reveal/repl the add-tap is automatic. Perhaps make it clearer that this section only applies if you have started the REPL some other way than via Reveal itself? Or maybe it was just my misreading of what's being discussed at this point in the README?

👍 3



I found several other aliases further down the README that are not highlighted as code with backticks.

seancorfield17:09:38 -- midje-runner is not unqualified in the alias -- but should be midje-runner/midje-runner (since unqualified lib names just double up in the group and artifact slot), otherwise you might cause a clash with any midje-runner lib that actually ends up with the midje group ID.

👍 3
seancorfield17:09:13 -- the documented -X entry points are hf.depstar/jar and hf.depstar/uberjar (the ones you have still exist for backward compatibility but are not documented).


Thank you Alex, Sean, most helpful and much appreciated.


Very cool @U05254DQM! Not sure if anyone mentioned what looks like a typo:

* deps = `:deps`, `:extra-deps`, `replace-paths`
* path = `:path`, `:extra-paths`, `replace-deps
` Last items seem reversed?


Good catch. @UE21H2HHD , I'll fix that copy past error, thanks.


Posting here because it there's a larger audience who might have more insight into Maven and its shade plugin behavior: The next version of depstar will preserve license/copyright files coming from dependencies by concatenating them (but omitting exact duplicates). As far as I can tell from inspection of several "uber" JAR files I found in the wild, this is the behavior of Maven with the shade plugin, with the additional license resource transformer (which omits duplicates). I couldn't find anything in Maven's documentation about this behavior, and looking at the source of the shade plugin didn't help much. If anyone here has deep insight into that aspect of Maven and can confirm its actual behavior, that would be very helpful (otherwise I'll just run with the depstar behavior I described).

Alex Miller (Clojure team)23:09:20

I've used the shade stuff several times and I'm not sure it is anything mandated by maven either way, you're in making stuff up territory :)

Alex Miller (Clojure team)23:09:18

I actually have come to think that the "right" way to do this is store things like that in lib-specific sub dirs under META-INF

☝️ 3
Alex Miller (Clojure team)23:09:51

I don't think concatenating is wrong though


Yeah, my inspection of various "uber" JAR files seemed to confirm that if maven shade finds META-INF/LICENSE or META-INF/LICENSE.txt in multiple dependencies, it simply concatenates them together in the resulting JAR file. My reading of the Apache license resource transformer seemed to confirm that it attempts to avoid duplicating the text of any license.


But this is definitely all "undocumented territory" as far as I can tell.