clj-commons

bocaj 2024-09-20T02:22:36.177069Z

Has anyone looked into Clojure 1.12 and param tags to simplify clj-ssh code ? From memory it was complex to deal with arity of the underlying java libs. Or is there a more recent ssh java lib?

Burin 2024-09-20T02:28:48.079499Z

Maybe you can try https://github.com/epiccastle/spire?

Burin 2024-09-20T02:32:00.884739Z

Also this https://github.com/epiccastle/bbssh?tab=readme-ov-file

👍 1
seancorfield 2024-09-20T02:51:56.454119Z

Requiring 1.12 is not a great idea for a library at this early stage. In a year, maybe.

❤️ 1
seancorfield 2024-09-20T02:56:15.825279Z

(or did you just mean in your own application code? If so, can you give an example @bocaj?)

bocaj 2024-09-20T03:11:13.504219Z

Good point, this would need to be a new library perhaps. Just thinking of looking into how simple use of jsch could get.

bocaj 2024-09-20T03:21:41.429829Z

I found jsch Channel useful here https://github.com/Jacob-Kroeze/tech.io.sftp/blob/main/src/tech/v3/io/sftp_client.clj but couldn’t use it easily because of overloading to java. I’m exploring if it would be worth adding to clj-ssh or if anyone else would be interested in a yet another ssh library. Or is my hunch correct that some wrapper libraries like clj-ssh can be written more clearly now?

seancorfield 2024-09-20T03:24:13.112529Z

Oh, I'm sure the library code could be cleaned up if it used 1.12... in our code at work, the places where we do heavy interop are cleaner on 1.12 (we have it in production already -- we've had every prerelease build in production for over 13 years).

bocaj 2024-09-20T03:25:06.059349Z

Great! 🙂

seancorfield 2024-09-20T03:29:43.025209Z

That Jacob Kroeze lib depends on clj-ssh. Maybe you could either add to that or provide a similar add-on to clj-ssh?

seancorfield 2024-09-20T03:30:10.424779Z

At work, we haven't needed much for sftp operations. We just use com.hierynomus/sshj {:mvn/version "0.39.0"} and a bit of Java interop.

seancorfield 2024-09-20T03:31:39.165099Z

The interop to do basic sftp ops is very straightforward and we haven't had to touch it for at least 3 years (I just checked).

bocaj 2024-09-20T04:08:25.652069Z

I wasn’t aware of that library and licenses look more clear. Thanks!