djblue / portal

A clojure tool to navigate through your data.
https://djblue.github.io/portal/
MIT License
900 stars 83 forks source link

Implement java.lang.AutoCloseable on portal.runtime.jvm.client.Portal #239

Open devurandom opened 1 month ago

devurandom commented 1 month ago

If portal.runtime.jvm.client.Portal would implement java.lang.AutoCloseable, I could (with-open [_ (p/open {,,,})] ,,,).

djblue commented 1 month ago

Interesting, what kind of use cases did you have in mind for this?

devurandom commented 1 month ago

I built a test fixture for portal, so I can tap> values to IntelliJ from tests.

djblue commented 1 month ago

Since the jvm implementation is the same one that runs on bb, and bb doesn't expose java.lang.AutoCloseable, I don't think portal can easily do this without forking the implementation a bit.