Fork me on GitHub
#polylith
<
2024-05-21
>
Samuel Ludwig14:05:36

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 Ludwig15:05:25

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

Samuel Ludwig15:05:58

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

seancorfield18:05:17

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

Samuel Ludwig18:05:23

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 Ludwig18:05:46

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

Samuel Ludwig18:05:52

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

seancorfield19:05:06

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

Samuel Ludwig19:05:01

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

seancorfield19:05:26

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

Samuel Ludwig19:05:47

yea... gloves on~

Samuel Ludwig20:05:00

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 Ludwig20:05:05

i appreciate the prodding

seancorfield20:05:05

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

Samuel Ludwig20:05:27

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

seancorfield21:05:35

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...

ag00:05:51

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.

seancorfield00:05:43

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