Fork me on GitHub

@nomiskatz user level aliases can be used in the Emacs .dir-locals.el configuration I put more general aliases in the user level and them complement or override with specific configuration in the project deps.edn So you could have (cider-clojure-cli-aliases . “:env/dev:project/dev”) where :env/dev is user level and :project/dev is project dep.edn There are some more examples here


@U05254DQM Thanks. I think that’s where I had got to with my :dev and :user-level-dev (now renamed to :user/dev) aliases. It’s good to know that seems to be the right approach. I’ve added your linked-to page to my big list of deps.edn-related things to look at.


If there's a library A I depend on with a git dep, has in its own dependencies a git dependency on library B with an wrong :git/sha and :git/tag combination, i get an error:

Error building classpath. Library <lib B> has sha and tag that point to different commits
This happens even if I add and :exclusions for lib B in my own deps.edn. First: is that supposed to happen? I think that it is based on (it's an error in the expansion step which happens before exclusions). Second: is there a way to somehow get around this?


Instead of trying to exclude B from A, have you tried putting the correct dependency on B directly into your deps.edn as a top-level dep?

Alex Miller (Clojure team)14:02:00

But I'll make a ticket for this, maybe it's something that could be handled with warning/continue somehow


If the tag and the SHA disagree, which should it pick though @U064X3EF3?

Alex Miller (Clojure team)14:02:13

But if same dep exists elsewhere in the tree could use that


Ah, gotcha. So it would warn about the mismatch and drop that library...

Alex Miller (Clojure team)14:02:40

You can't drop the lib but you could not consider that version


> have you tried putting the correct dependency on B directly into your deps.edn as a top-level dep? Yeah that definitely be the ideal answer and in my case I can, just had me thinking it would be more annoying to have to do if I didn't control library B and have to fork it just for that. Not that that would be tools dep's fault/responsibility, just curious if it had a way to mitigate it.


Oh wait I read the thing I quoted wrong. I thought you meant fix it in B


I did in fact already have the corrected dependency on B in my own deps.edn when it was giving me the error

Alex Miller (Clojure team)15:02:07

well, that seems like a bug. I added to track this. needs more detail but placeholder for now.


Thanks, I could try to get a minimal repro over the weekend if that'd be useful

Alex Miller (Clojure team)15:02:19

probably not needed, I should be able to repro easily

👍 1
Adam Helins17:02:48

(Sorry if it's a common request, I have found much references about it) I often feel like being able to provide aliases when using a :git/sha dep would provide quite a lot of flexibility. Has it been considered more thoroughly?

Alex Miller (Clojure team)17:02:41

We have a ticket for it, have not thought about it deeply

Adam Helins18:02:43

A use case is being able to consume from monorepo-like projects (e.g. several libs organized in a single repo)


@adam678 This is already possible using :deps/root



 {cheshire/cheshire                         {:mvn/version "5.10.0"}
  com.taoensso/nippy                        {:mvn/version "3.1.1"}
  com.github.clj-easy/graal-config-cheshire {:git/url   ""
                                             :git/sha   "b06e33694d2c878169958f7317ea01d9c0353ab4"
                                             :deps/root "config/cheshire/cheshire"}
  com.github.clj-easy/graal-config-nippy    {:git/url   ""
                                             :git/sha   "b06e33694d2c878169958f7317ea01d9c0353ab4"
                                             :deps/root "config/com.taoensso/nippy"}}}

👀 1
Adam Helins08:02:08

Yes but this works only when each "subproject" has its own deps.edn, but not for setups having just one root deps.edn

Ian Fernandez20:02:28

How can I debug this error?

Caused by: org.apache.http.client.HttpResponseException: status code: 400, reason phrase: Repository version policy: SNAPSHOT does not allow version: 0.7.0 (400)

Ian Fernandez20:02:56

like, I'm trying to add inside :mvn/repos key, {"my-repo" {:url ,,, :snapshots false}}

Ian Fernandez20:02:08

this keyword works?

Ian Fernandez20:02:33

I'm translating a project.clj to a deps.edn and this got into my way

Alex Miller (Clojure team)21:02:50

this is not currently supported for deps.edn

Ian Fernandez21:02:22

:thinking_face: there's another way to correct this error that I'm having?

Ian Fernandez21:02:27

got working adding another repo for it