tools-deps

Alex Miller (Clojure team) 2023-10-27T20:42:08.027849Z

@seancorfield (or others), do you know of places where polylith or anything is creating a tools.deps basis using a custom :project deps.edn, particularly in a directory other than the current directory?

namenu 2023-10-28T08:20:56.686889Z

we use polylith too and every .cpcache/**.basis is created in the same path where deps.edn is located.

Alex Miller (Clojure team) 2023-10-28T13:56:15.983609Z

Thanks, good to know

greg 2024-02-08T21:26:20.424969Z

> local deps are resolved relative to the current directory, I had this issue a while ago in my internal tooling. I ended up wrapping resolve-deps with clojure.tools.deps.util.session/with-session and`clojure.tools.deps.util.dir/with-dir` . That did the job for me.

Alex Miller (Clojure team) 2024-02-08T21:27:09.909109Z

that's by design and how you should address - the problem above is actually different

greg 2024-02-08T21:30:32.841299Z

ok

Alex Miller (Clojure team) 2023-10-27T20:46:03.483479Z

I'm looking at https://clojure.atlassian.net/browse/TDEPS-256 where I believe the problem is that if a :project deps.edn is provided in some other directory, local deps are resolved relative to the current directory, not relative to the project deps.edn, which seems wrong. I would like to fix this but want to make sure I'm not going to horribly break something someone is depending on

seancorfield 2023-10-27T20:50:25.475179Z

I'll check our repo... just a sec...

seancorfield 2023-10-27T20:50:55.664889Z

...nope, not in our Polylith repo...

Alex Miller (Clojure team) 2023-10-27T20:54:38.918119Z

I imagine someone probably would have mentioned this if so, but trying to be cautious