This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-04
Channels
- # announcements (7)
- # babashka (26)
- # babashka-sci-dev (19)
- # beginners (66)
- # calva (4)
- # clj-kondo (55)
- # cljs-dev (173)
- # cljsrn (17)
- # clojure (86)
- # clojure-art (3)
- # clojure-australia (1)
- # clojure-europe (24)
- # clojure-india (1)
- # clojure-nl (3)
- # clojure-uk (6)
- # clojured (5)
- # clojurescript (39)
- # cursive (8)
- # data-oriented-programming (20)
- # datomic (9)
- # emacs (10)
- # events (1)
- # figwheel-main (16)
- # fulcro (33)
- # gratitude (1)
- # helix (2)
- # hugsql (2)
- # jobs (2)
- # kaocha (4)
- # leiningen (5)
- # lsp (110)
- # malli (1)
- # missionary (17)
- # observability (3)
- # re-frame (10)
- # reagent (1)
- # reitit (7)
- # rewrite-clj (3)
- # shadow-cljs (63)
- # sql (19)
- # tools-build (74)
- # tools-deps (32)
- # transit (1)
- # xtdb (5)
@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 https://practical.li/spacemacs/clojure-projects/project-configuration.html
@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 https://clojure.org/reference/dep_expansion (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?
That's a good idea
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?
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...
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.
I did in fact already have the corrected dependency on B in my own deps.edn when it was giving me the error
well, that seems like a bug. I added https://clojure.atlassian.net/browse/TDEPS-217 to track this. needs more detail but placeholder for now.
(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?
We have a ticket for it, have not thought about it deeply
A use case is being able to consume from monorepo-like projects (e.g. several libs organized in a single repo)
Example:
{:deps
{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"}}}
Yes but this works only when each "subproject" has its own deps.edn
, but not for setups having just one root deps.edn
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)
like, I'm trying to add inside :mvn/repos key, {"my-repo" {:url ,,, :snapshots false}}
this keyword works?
I'm translating a project.clj to a deps.edn and this got into my way
this is not currently supported for deps.edn
:thinking_face: there's another way to correct this error that I'm having?
got working adding another repo for it
thanks