Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cats-effect 3 #392

Closed
Fristi opened this issue Jun 21, 2021 · 1 comment
Closed

cats-effect 3 #392

Fristi opened this issue Jun 21, 2021 · 1 comment

Comments

@Fristi
Copy link
Contributor

Fristi commented Jun 21, 2021

Hiya,

The lib is still on version 2, to upgrade to version 3 is see that Monix is behind in upgrading. Would you mind if open a PR dropping these modules?

The thing we like about your library it's based on sttp. This means you can plug in any backend you would like to to interact with keycloak. This could be:

  • Try
  • Future
  • ZIO
  • Monix
  • cats-effect IO

It's nice to have modules setup, but it creates a burden to maintain

@StuartJ45
Copy link
Contributor

Hi Mark,

I do agree that the modules are a burden to maintain, but I'm not sure of the alternative.

I don't think it's as simple as swapping out sttp backends, at least with the current setup.
We need to be able to compose sttp calls and use functionality that the above monads provide.
This means that, as far as I'm aware, we can't create a single abstract module that can work with any monad, as we need a more specific monad implementation so that we have access to flatMap, error handling functions, etc.
This is also why we'd require a new Zio module (#366) in order to properly support the use of this library in a Zio project.

You'll see that the base admin API module (keycloak4s-admin) is somewhat abstracted, by restricting the monad type to one that supports cats Concurrent. This way, we can compose calls and add error handling and retry logic.

@Fristi Fristi closed this as completed Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants