tools-deps

2025-01-01T16:45:19.006479Z

Is there any way to import a dependency with type pom? E.g. with lein, it would be [org.graalvm.polyglot/js "24.1.1" :extension "pom"]

✅ 1
Alex Miller (Clojure team) 2025-01-01T17:00:01.743959Z

currently, no

Alex Miller (Clojure team) 2025-01-01T17:00:19.230809Z

but you can import the poms dependencies instead

2025-01-01T17:01:17.129639Z

Hi Alex, thanks! What do you mean by import poms dependencies?

Alex Miller (Clojure team) 2025-01-01T17:03:24.098909Z

that pom depends on other deps, and you can just import those directly instead

2025-01-01T17:04:21.796759Z

Ah, like, find those which are having this one as a dependency and import them?

Alex Miller (Clojure team) 2025-01-01T17:08:01.128499Z

yeah - if you go to https://mvnrepository.com/artifact/org.graalvm.js/js/24.1.1 you can see that this pom just depends on two other deps

🙏 1
2025-01-01T17:09:18.599049Z

Got it, will try! 👍

Alex Miller (Clojure team) 2025-01-01T17:09:40.289839Z

this is an area I've spent some time on adding support for tools.deps, still thinking about some details of it

2025-01-01T17:15:44.234349Z

I see! So you've considered adding support for type pom, but something was not so smooth about the potential implementation?

Alex Miller (Clojure team) 2025-01-01T17:25:16.282849Z

yes, there's a patch at https://clojure.atlassian.net/browse/TDEPS-202 but it got me thinking about the more general issue of composites and how we could support that in deps.edn as well

Alex Miller (Clojure team) 2025-01-01T17:25:43.677359Z

hoping to move that forward soon

2025-01-01T17:27:17.040019Z

Thanks, will take a look!

Alex Miller (Clojure team) 2025-01-01T17:11:00.354619Z

I released a new tools.deps and a developer (non-stable) release of the CLI using it yesterday - 1.12.0.1495. This release represents a big chunk of long overdue refactoring in how the CLI calculates the classpath, especially with regard to tools. There are really 3 parts to the CLI implementation: 1. the bash script (or deps.clj port for Windows users) which calls ... 2. the make-classpath2 main which uses the lib ... 3. tools.deps - previously focused on calc-basis, now on create-basis as the primary entry point make-classpath2 is the chunk of Clojure code that knows both the CLI context (where files and caches and dirs are, etc) and then calls the much cleaner entry point in tools.deps. A lot of the tools.deps entry point was reworked a couple years ago from https://clojure.github.io/tools.deps/#clojure.tools.deps/calc-basis into https://clojure.github.io/tools.deps/#clojure.tools.deps/create-basis (which is used by all the -X:deps programs for example). At that time, there was a lot of cruft esp around tools and so make-classpath2 was never updated (and duplicated a lot of create-basis). All that has now been collapsed and various hacks and duplication were removed. The end result should hopefully be no visible change in behavior there is some new code involved, particularly for tool invocation (-T). I've tested lots of stuff, but would be happy for some more eyes on it, especially if you do a lot of clj -T stuff.

🎉 4
borkdude 2025-01-06T15:55:12.288099Z

I've bumped it at least in deps.clj and bb itself (which runs a lot of integration tests with existing projects) and so far no problems