polylith

Samuel Ludwig 2024-05-21T14:51:36.505309Z

experiencing a pretty opaque error/stack-trace when trying to start up clojure -M:poly in my workspace; its been a few weeks since I've created a new component/base and so haven't run it in a while, and so can't pin down the error to a specific bit of code easily. My dev-file (which imports a significant amount of namespaces) runs without any errors/exceptions, so there's no namespace thats clearly broken afaict: stack-trace in ๐Ÿงต

Samuel Ludwig 2024-05-21T14:53:34.327149Z

ST in file:

Samuel Ludwig 2024-05-21T15:08:25.343009Z

based on the trace, it seems like its breaking on a "sort-libs" step?

Samuel Ludwig 2024-05-21T15:13:58.884329Z

I'll send the deps.edn as well, if its related

Samuel Ludwig 2024-05-21T15:14:23.519089Z

seancorfield 2024-05-21T18:40:17.986279Z

I suspect the most likely issue is a deps.edn in one of your bases or components that has an unparseable :mvn/version?

Samuel Ludwig 2024-05-21T18:44:23.236859Z

thats what im trying to look through now yea, not sure what it'd be though, I've seen a combination of version schemes that haven't had issue (ive had 1.12.0-alpha9_4 for a while without issue i believe, which is the most esoteric looking version scheme that I can see)

Samuel Ludwig 2024-05-21T18:45:46.534809Z

let me see if i can get a dump of versions with some grep magic

Samuel Ludwig 2024-05-21T18:51:24.993129Z

versions:

Samuel Ludwig 2024-05-21T18:52:52.238759Z

not seeing anything super weird here? i have commented out the 1.12.0-alpha9_4 dependency and it didnt seem to do anything

seancorfield 2024-05-21T19:12:06.607229Z

What happened that produced {metosin/reitit {:mvn/version "0.7.0-alpha7"} as opposed to the rest all starting with {:mvn/version?

Samuel Ludwig 2024-05-21T19:15:01.072529Z

i missed a manual dt{ (delete) when editing the file :^)

seancorfield 2024-05-21T19:49:26.353729Z

All I can suggest at this point is commenting out parts of :dev > :extra-deps to bisect until you find the likely candidate...

Samuel Ludwig 2024-05-21T19:55:47.161279Z

yea... gloves on~

Samuel Ludwig 2024-05-21T20:20:00.452159Z

okay.. it looks like i had a couple libs that had different versions in the :dev alias and individual project/component deps, and that was the cause of this 'sorting error' stacktrace, very interesting...

Samuel Ludwig 2024-05-21T20:20:05.791569Z

i appreciate the prodding

seancorfield 2024-05-21T20:21:05.724339Z

What were the different versions that couldn't be "sorted" by Polylith?

Samuel Ludwig 2024-05-21T20:23:27.219339Z

0.7.0 vs 0.7.0-alpha7 for one of them (reitit, serendipitously), and 2.8.0 vs 2.8.0-beta3 (http-kit); so it seems like it doesn't like a mixture of flat-versions and versions with qualifiers

seancorfield 2024-05-21T21:40:35.808509Z

That sounds like a bug in Polylith -- you could create a GH issue... it would probably be fairly easy to create a minimal repro with that information known...

ag 2024-05-22T00:49:51.858819Z

I'm glad it's not the deps.edn typo problem. Still, deps could do a better job checking the keys. I once spent a good amount of time trying to figure out why nothing was working. I had :extra-path key (singular, proper is :paths) in one of the deps.edn files. I wish something had told me about it.

seancorfield 2024-05-22T00:59:43.968019Z

Polylith doesn't really use tools.deps for a lot of this -- which is why you get bugs like these. tools.deps can compare these versions just fine.

๐Ÿ‘ 1