Fork me on GitHub
#tools-deps
<
2021-04-17
>
introom16:04:51

Hi. I wonder what is allowed to put under an :alias. It looks to me putting :mvn/repos under an alias has no effect.

introom16:04:02

But the reference is vague on what I can do. https://clojure.org/reference/deps_and_cli

practicalli-john16:04:27

@i :mvn/repos is a top level key in deps.edn, along with :deps , :path and :aliases, so I wouldn't expect it to be used within one of the other top level keys. I assume any other names than those of top level keys are usable within :aliases. I use namespaced keywords to add context to the aliases and hopefully avoid clashing with any additional top level aliases that may be introduced in future (although things have been quite stable for a while) https://github.com/practicalli/clojure-deps-edn

introom02:04:21

Take :mvn/repos for example, no way I could know it cound’t be put into aliases, unless I put it and find there would be an error.

introom02:04:58

An extra question, do you know where to specify the .rebel-history file. Currently, it is always created under my working directory.

seancorfield02:04:43

@i It makes sense that it would be created wherever you run a REPL using Rebel Readline — that’s exactly what nREPL does with its .nrepl-history file.

seancorfield02:04:24

Same as the Clojure CLI creating .cpcache in the working directory.

practicalli-john02:04:12

I agree with Sean about the history as the large majority of expressions will be project specific. There is a global config file for rebel, but I don't see an option for setting a global history file. https://practicalli.github.io/clojure/clojure-tools/repl/customize-rebel.html If there really is a case for a global history file, then I suggest raising an issue on the rebel readline project.

seancorfield02:04:42

The docs (for deps.edn) are not as explicit as they could be. deps.edn is described “with top-level keys :deps, :paths, and :aliases, plus provider-specific keys for configuring dependency sources” but you have to read the Procurers section much further on to find mention of the :mvn/repos (top-level procurer-specific key). And I don’t see :mvn/local-repo mentioned there (it’s another top-level procurer-specific key, to change the default "~/.m2" folder path).