vlovgr/ciris

How to contribute extensions?

Closed this issue · 4 comments

Have been falling for Ciris lately and begun efforts to move our configuration patterns over to it. In-house I've been developing extensions for Hashicorp Consul and Vault. Any guidance on how such contributions should be structured? I have been utilizing the ciris namespace, which seems to be an established pattern. In regards to dependencies, neither has a Hashicorp-provided JVM lib; should I wrap against their HTTP endpoints via a Typelevel HTTP client, e.g. http4s, or is it okay to include third party Java wrappers?

Thanks for raising this issue! The contributing guide should definitely include a section on how to contribute new modules, and I'll try to put some effort into documenting this. In the meantime, you could have a look at pull requests for previous modules (e.g. #103), and the external libraries.

Have been falling for Ciris lately and begun efforts to move our configuration patterns over to it.

That's great! I'd be very happy to answer any questions you might have, and hear about your experiences, either here or on Gitter.

In-house I've been developing extensions for Hashicorp Consul and Vault

Modules for Consul and Vault would both be very welcome additions!

Any guidance on how such contributions should be structured?

For now, pull requests like #103 and external libraries can serve as examples. I'd very much appreciate hearing about your experience of contributing a new module, and we can try to clarify any pain points in the contributing guide.

I have been utilizing the ciris namespace, which seems to be an established pattern.

Yes, that sounds good. Both the modules here and the external libraries follow this pattern.

In regards to dependencies, neither has a Hashicorp-provided JVM lib; should I wrap against their HTTP endpoints via a Typelevel HTTP client, e.g. http4s, or is it okay to include third party Java wrappers?

The external libraries mostly make use of third party Java libraries, but I don't see a reason why multiple alternatives could exist, i.e. ciris-consul-http4s and ciris-consul-*. I'll leave it up to you to decide with which libraries you'd like to integrate.

Also, there is a native Scala client for Consul, helm, which might be of interest.

Ah! Forgot that Helm finally cut over to Cats. Will definitely do that.

@goedelsoup it has taken quite a while longer than I had expected to get this written up, but there's now #144 which should help out with this -- do you want to have a look before I merge?