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

DX: fix some issues #1532

Merged
merged 2 commits into from
Aug 26, 2022
Merged

DX: fix some issues #1532

merged 2 commits into from
Aug 26, 2022

Conversation

Fristi
Copy link
Contributor

@Fristi Fristi commented Aug 19, 2022

  • Seems with zio module the alias SttpClient was removed, brought this back to have smoother migration experience
  • The zio1 stub does not include WebSockets .. this causes compilation issues

Check list

  • Check if the project compiles by running sbt compile (exited due java.lang.OutOfMemoryError: Java heap space .. maybe include a .sbtopts to mitigate this?)
  • Verify docs compilation by running sbt compileDocs
  • Check if tests pass by running sbt test
  • Format code by running sbt scalafmt

@adamw
Copy link
Member

adamw commented Aug 19, 2022

Thanks! How would the HttpClient alias be used? Maybe you could adjust the example in https://github.com/softwaremill/sttp/blob/master/examples/src/main/scala/sttp/client3/examples/GetAndParseJsonZioCirce.scala

@Fristi
Copy link
Contributor Author

Fristi commented Aug 19, 2022

def sendAndPrint(backend: SttpClient): Task[Unit] in this case, but I also like the SttpBackend[Task, Any] .. but from a DX perspective you'll just annotate your layers and service implementaties with the types provided by what sttp gives you (SttpBackend[Task, ZioStreams with WebSockets]) .. which is a quite complex type

@adamw
Copy link
Member

adamw commented Aug 26, 2022

Thanks, I'll merge this but remove the type alias for now, for two reasons:

@adamw adamw merged commit 44dc113 into softwaremill:master Aug 26, 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

Successfully merging this pull request may close these issues.

2 participants