leiningen

Nim Sadeh 2024-01-02T02:38:55.395059Z

I am trying to follow https://www.pgrs.net/2011/10/30/using-local-jars-with-leiningen/, but I am actually failing on checksum:

Could not transfer artifact dev.langchain4j:langchain4j-pinecone:jar:0.26.0 from/to local (file:/Users/nsadeh/Dropbox/modeldiplomat/pinecone-sync/maven_repository/): Checksum validation failed, no checksums available

hifumi123 2024-01-02T09:16:15.579079Z

Is the JAR not signed at all? Security issues aside, you can set :checksum :ignore in your project.clj

hifumi123 2024-01-02T09:16:40.529569Z

Although this should immediately fix your issue, I highly recommend against doing this. You shouldn’t deploy or rely on unsigned code IMO

seancorfield 2024-01-02T15:31:23.551769Z

@hifumi123 I mentioned both of those points earlier in the thread...

Nim Sadeh 2024-01-02T02:40:06.186949Z

Full error:

Retrieving dev/langchain4j/langchain4j-pinecone/0.26.0/langchain4j-pinecone-0.26.0.pom from local
Retrieving dev/langchain4j/langchain4j-pinecone/0.26.0/langchain4j-pinecone-0.26.0.jar from local
Could not find artifact dev.langchain4j:langchain4j-pinecone:jar:0.26.0 in central ()
Could not find artifact dev.langchain4j:langchain4j-pinecone:jar:0.26.0 in clojars ()
Could not transfer artifact dev.langchain4j:langchain4j-pinecone:jar:0.26.0 from/to local (file:/Users/nsadeh/Dropbox/modeldiplomat/pinecone-sync/maven_repository/): Checksum validation failed, no checksums available
Failed to read artifact descriptor for dev.langchain4j:langchain4j-pinecone:jar:0.26.0
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.

Nim Sadeh 2024-01-02T02:40:10.727179Z

For lein deps

seancorfield 2024-01-02T03:16:35.318139Z

That's a very old blog post and I expect leiningen had tightened up security regarding checksums since then. There may be an option you can add to project.clj to tell lein to not validate checksums (not recommended for general use but might since your specific problem).

Nim Sadeh 2024-01-02T03:20:06.742489Z

What's considered the current way use a JAR file in a Lein build? I had to fork the Java repo to fix a bug

Nim Sadeh 2024-01-02T03:20:32.149179Z

It's not the only thing that hasn't been working, the entire workflow has been difficult

seancorfield 2024-01-02T03:22:30.912689Z

I switched from lein years ago so that's all I got. It's simple to use local JAR files with CLI / deps.edn 🤷🏻

seancorfield 2024-01-02T03:25:59.244929Z

:checksum :ignore is the option I was thinking of... In the specific repository definition I think? You'd have to check the docs.

Nim Sadeh 2024-01-02T03:32:40.343679Z

I ended up using https://github.com/kumarshantanu/lein-localrepo and it just worked

seancorfield 2024-01-02T03:35:37.951269Z

Yeah, I used to use that occasionally back in the day. Forgot about that... Heh, 2015 was probably when I last used lein seriously.

Nim Sadeh 2024-01-02T03:37:24.151069Z

So all I am actually trying to do is verify that my fix to langchain (https://github.com/langchain4j/langchain4j/pull/437) actually works. Maybe there's an easier way

seancorfield 2024-01-02T03:42:37.724179Z

You didn't have to change or add any tests for that change to pass the tests?