Fork me on GitHub

Is it possible to use git repositories hosted in source hut with the new tools functionality? I'd like to be able to do

clojure -Ttools install  '{:git/tag ...}' :as tool
Looking through the source of tools.deps, there is a hardcoded list of hosted that seems to be parsing the git repo, but sourcehut is absent. I was hoping there would be a way to just provide a url directly


I think I have answered this myself (by looking more closely at the code). I can pick a meaningful name and provide a :git/url in the argument map. So this works

clojure -Ttools install  '{:git/tag ... :git/url ""}' :as tool 

duckie 1
Alex Miller (Clojure team)03:01:10

Yes, support for most git url types is supported that way, including git file repos


Do you know if it's possible to do this with the clojure -X:deps find-versions tool as well?

Alex Miller (Clojure team)12:01:13

It takes an optional :git/url iirc

Alex Miller (Clojure team)12:01:52

Actually it doesn't, but it easily could


That's what I thought, I had poked around but couldn't get it working. Is there a place I can open a ticket for that?


Is there any reason that a basis doesn’t convey which aliases were activated to form its classpath roots? (or is there and I’m just missing it)


Hmm, can :mvn/local-repo be put into an alias, in order to override the cache path in CI (Gitlab) while keeping the default path locally?


ah, by adding

-Sdeps '{:mvn/local-repo ".m2"}


didn't realise that this still reads the deps.edn, thought it would override it 🙂


what’s the equivalent of a peer dependency with tools.deps? i.e. if I’d like to ensure a library is included but don’t want to put constraints on the version or where it’s loaded from


That is bad, don't do it


You have a version you tested with, you should depend on that version


(a user of your library can always specify a different version if they want -- but with the usual "not tested against that version" caveats)

hiredman20:01:40 someone involved with golang tools writing about a recent npm issue with packages not depending on specific versions

👍 1

for this use-case it’s actually for a monorepo. I was looking for a way to specify a global dependency for the project, rather than listing it out in each subproject


this is for a front-end app, where you wouldn’t want two versions of React running, for example