tools-deps

seancorfield 2023-08-22T00:14:15.599199Z

https://stackoverflow.com/questions/76943471/clojure-deps-edn-not-resolving-dependency -- after a brief poke at this, it seems that something, somewhere in the chain of dependencies is requesting a version of babel__highlight that doesn't actually exist (7.x seems to be the highest version on Maven) and it looks like the waltid deps have a lot of <scope> specifiers in their various POM files so I'm wondering if this is due to tools.deps trying to follow a dependency that is marked with a <scope> that it should perhaps be ignoring? What would be an "easy" way to debug this, given that resolution ultimately fails?

Alex Miller (Clojure team) 2023-08-22T00:22:13.719989Z

tdeps should take compile and runtime scopes

Alex Miller (Clojure team) 2023-08-22T00:23:22.238219Z

I would probably debug it by loading tdeps in the repl and using a modified version of one of those commented out examples with a debugger

seancorfield 2023-08-22T00:24:17.210839Z

There's no "magic" debug or trace option that makes it write out resolutions as it goes?

Alex Miller (Clojure team) 2023-08-22T00:24:36.226899Z

no

seancorfield 2023-08-22T00:25:18.004399Z

Looks like the waltid ssikit pom is all compile/runtime so that's safe. But it depends on a ton of stuff so figuring our where in the full tree it breaks is going to be tedious 🙂

seancorfield 2023-08-22T00:25:32.772439Z

It's not my problem -- I just wanted to help the person on SO 🙂

seancorfield 2023-08-22T00:27:17.234419Z

It feels like some sort of "debugging mode" for deps resolution might be useful for situations like this -- instead of just "error! failed!" -- would you entertain a patch that added some sort of logging/trace mode that could produce output during resolution to help debug situations like this?

seancorfield 2023-08-22T01:00:51.386219Z

With your pointer, I modified trace+ to print entry which helped... turns out that because tools.deps picks the most recent version available on transitive deps, it managed to find org.webjars.npm/babel__code-frame 8.0.0-alpha1 which depends on a version range for babel__highlight that has not been released yet!

seancorfield 2023-08-22T01:02:34.580829Z

So I pinned that to 7.21.4 but I'm seeing quite a few

Download corrupted: Checksum validation failed, no checksums available
which doesn't seem to stop the CLI from continuing... I assume that can be "safely" ignored?

Alex Miller (Clojure team) 2023-08-22T01:18:42.216419Z

Re debug, yes, but just has not seemed worth doing as I rarely need it (and I usually end up debugging such things anyway)

Alex Miller (Clojure team) 2023-08-22T01:28:20.907579Z

re checksums, I assume that's continuing because it's only a warning to be missing the checksums, but I haven't seen that before

seancorfield 2023-08-22T01:30:02.637709Z

(the printout from trace+ "helped" but still needed a fair bit of intuition about "how this all works" for me to narrow down the problem to a handful of dependencies that I then had to go check on Maven manually -- so I suspect you're right that this isn't widely useful)

seancorfield 2023-08-22T01:30:29.207399Z

Thank you for the valuable pointers tho'!

Alex Miller (Clojure team) 2023-08-22T01:33:35.633729Z

the info you need is often context dependent when debugging a problem and too much can be more harmful than helpful so... not an urgent need