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

Remove sttpClientTag #2312

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Remove sttpClientTag #2312

merged 1 commit into from
Oct 15, 2024

Conversation

wi101
Copy link

@wi101 wi101 commented Oct 15, 2024

Resolves #2311

Add a type ZioWebSocketsStreams to help capturing the type tag of ZioStreams with WebSockets here

Before submitting pull request:

  • Check if the project compiles by running sbt compile
  • Verify docs compilation by running sbt compileDocs
  • Check if tests pass by running sbt test
  • Format code by running sbt scalafmt

@wi101 wi101 changed the title remove sttpClientTag Remove sttpClientTag Oct 15, 2024
@adamw adamw merged commit f4d9242 into softwaremill:v3 Oct 15, 2024
11 checks passed
@adamw
Copy link
Member

adamw commented Oct 15, 2024

Thanks for fixing my ugly hack :) I was wondering if it's going to break anything, thought the tests passed ... ;)

@wi101 wi101 deleted the fix-tag branch October 16, 2024 08:16
@wi101
Copy link
Author

wi101 commented Oct 16, 2024

@adamw the way how it didn't compile even without the type alias is questionable, I am still trying to understand the reason that caused the compiler to not find the sttpClientTag when it didn't use the type alias, this might be related to a confusion between dependencies
this is the error

 -- [E172] Type Error: tak/sttp/effects/zio/src/main/scalajvm/sttp/client3/httpclient/zio/package.scala:34:51 
[error] 34 |    ZIO.serviceWithZIO[SttpClient](_.send(request))
[error]    |                                                   ^
[error]    |could not find implicit value for izumi.reflect.Tag[sttp.client3.httpclient.zio.SttpClient]. Did you forget to put on a Tag, TagK or TagKK context bound on one of the parameters in sttp.client3.httpclient.zio.SttpClient? e.g. def x[T: Tag, F[_]: TagK] = ....
[error]    |I found:
[error]    |
[error]    |    zio².Tag.materialize[
[error]    |      
[error]    |        sttp.client3.SttpBackend[zio².Task, sttp.capabilities.zio³.ZioStreams &
[error]    |          sttp.capabilities.WebSockets]
[error]    |      
[error]    |    ]
[error]    |
[error]    |But method materialize in trait TagVersionSpecific does not match type zio².Tag[sttp.client3.httpclient.zio.SttpClient]
[error]    |
[error]    |where:    zio  is a package in package sttp.client3.httpclient
[error]    |          zio² is a package
[error]    |          zio³ is a package in package sttp.capabilities

it looks like it required izumi.reflect.Tag and found zio.Tag 🤔

@adamw
Copy link
Member

adamw commented Oct 16, 2024

Yeah this was some problem in ZIO ... which I can't find right now ;)

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