leiningen

Nim Sadeh 2024-01-29T20:02:04.162879Z

I upgraded one of my (Java) dependencies in my project.clj file. One of the changes is that one of the classpaths was renamed. My code as-is threw an error about not finding the class which is expected. I changed the name to the new name, but it can't find that either. There seems to be some sort of lein/cider issue where the old version is cached somewhere. Is there a way to clean the dependency record? Is upgrading a package supposed to be this hard?

seancorfield 2024-01-29T20:03:21.017419Z

Can you provide specifics? What library? What original version, and what new version? Which class?

seancorfield 2024-01-29T20:03:36.350749Z

(in general, updating deps should be easy but...)

vemv 2024-01-29T20:03:53.462669Z

IIRC you had a very old enrich-classpath plugin in your project.clj

Nim Sadeh 2024-01-29T20:05:35.505009Z

Sure Langchain4J 0.24.0 -> 0.25.0 Per this commit, the class dev.langchain4j.data.document.parser.PdfDocumentParser is now dev.langchain4j.data.document.parser.apache.pdfbox.ApachePdfBoxDocumentParser. An issue I made that was causing my app to crash (document splitter was not concurrency-safe) should be patched in this new version which is why I want to upgrade

Nim Sadeh 2024-01-29T20:07:41.055209Z

@vemv what do you mean? I have lein-environ and lein-localrepo plugins, 1.2.0 and 0.5.4

vemv 2024-01-29T20:09:12.305659Z

There's a plugin named enrich-classpath. A user in this channel recently posted a project.clj with a very old version of it

vemv 2024-01-29T20:09:50.858929Z

If that's not it, lein deps :tree is your friend

seancorfield 2024-01-29T20:10:42.792649Z

@nnnsadeh Can you share your project.clj -- or at least the various langchain4j dependencies?

Nim Sadeh 2024-01-29T20:11:20.930699Z

Nim Sadeh 2024-01-29T20:13:34.093579Z

Oh it might be those local repos I tried to setup a while ago and forgot about

seancorfield 2024-01-29T20:15:27.991489Z

You need to add [dev.langchain4j/langchain4j-document-parser-apache-pdfbox "0.25.0"]

Nim Sadeh 2024-01-29T20:16:02.000429Z

Oh did they split that out of the main jar?

Nim Sadeh 2024-01-29T20:17:53.806629Z

That did it, thanks. This is the last project that will use langchain. Out of curiosity where did you see this?

seancorfield 2024-01-29T20:19:31.702569Z

I searched the code repo for the new class -- but it is explained in the Breaking Changes section of the release notes, now that I look there: https://github.com/langchain4j/langchain4j/releases/tag/0.25.0

seancorfield 2024-01-29T20:20:56.493859Z

I guess since it isn't yet a 1.x release, they feel it's OK to make breaking changes in a minor update...

Nim Sadeh 2024-01-29T20:20:56.819799Z

My fault for not reading the changelog

Nim Sadeh 2024-01-29T20:21:17.177299Z

Basically only I use it I think...