tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
Aaron Cummings 2020-09-16T00:41:55.262100Z

I'll take a look at that, thanks.

practicalli-john 2020-09-16T11:52:14.271500Z

https://github.com/practicalli/clojure-deps-edn/tree/qualified-alias-keywords-and-new-flags is a refactor of the project wide aliases in light of the changes coming in Clojure CLI tools (version 1.10.1.681 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). https://gist.github.com/jr0cket/ae7dd745eb45870109ace59fe835ce80 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.

alexmiller 2020-09-16T13:52:22.271700Z

-P can be used with -X too

alexmiller 2020-09-16T13:55:58.271900Z

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.

👍 1
alexmiller 2020-09-16T13:56:16.272100Z

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

alexmiller 2020-09-16T13:58:26.272500Z

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

👍 1
seancorfield 2020-09-16T17:08:08.273100Z

curl -O <https://download.clojure.org/install/linux-install-1.10.1.681>
chmod +x linux-install-1.10.1.681.sh
sudo ./linux-install-1.10.1.561.sh
Version is not correct in that last line.

seancorfield 2020-09-16T17:09:51.273300Z

Run project with or without an alias:

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

seancorfield 2020-09-16T17:10:44.273500Z

: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.

seancorfield 2020-09-16T17:12:11.273700Z

https://cljdoc.org/d/seancorfield/next.jdbc/1.1.588/doc/getting-started#create--populate-a-database 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?

❤️ 1
seancorfield 2020-09-16T17:12:59.274100Z

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

seancorfield 2020-09-16T17:15:21.274300Z

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?

👍 1
seancorfield 2020-09-16T17:15:33.274500Z

"DEPRICATED" => "DEPRECATED"

seancorfield 2020-09-16T17:15:57.274700Z

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

seancorfield 2020-09-16T17:22:38.274900Z

https://github.com/practicalli/clojure-deps-edn/blob/qualified-alias-keywords-and-new-flags/deps.edn#L444 -- 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.

👍 1
seancorfield 2020-09-16T17:24:13.275200Z

https://github.com/practicalli/clojure-deps-edn/blob/qualified-alias-keywords-and-new-flags/deps.edn#L575-L590 -- 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).

practicalli-john 2020-09-16T18:52:36.275900Z

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

lread 2020-09-16T21:02:27.276100Z

Very cool @jr0cket! 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?

practicalli-john 2020-09-16T21:59:35.276300Z

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

seancorfield 2020-09-16T23:30:54.279400Z

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).

alexmiller 2020-09-16T23:39:20.280200Z

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 :)

alexmiller 2020-09-16T23:40:18.280900Z

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

☝️ 1
alexmiller 2020-09-16T23:40:51.281300Z

I don't think concatenating is wrong though

seancorfield 2020-09-16T23:55:04.283300Z

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.

seancorfield 2020-09-16T23:55:42.283700Z

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