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

Use of accents causes fiber to get stuck #898

Closed
julioselva opened this issue Oct 17, 2023 · 0 comments · Fixed by #946
Closed

Use of accents causes fiber to get stuck #898

julioselva opened this issue Oct 17, 2023 · 0 comments · Fixed by #946
Labels
bug Something isn't working
Milestone

Comments

@julioselva
Copy link

These are some of the characters that cause the issue: é, ú, ã, ç...
Same happens when supplying the JsonCodec.schemaBasedBinaryCodec or CodecSupplier.utf8string

import zio._
import zio.redis._
import zio.schema._
import zio.schema.codec._

object ZIORedisExample extends ZIOAppDefault {

  object ProtobufCodecSupplier extends CodecSupplier {
    def get[A: Schema]: BinaryCodec[A] = ProtobufCodec.protobufCodec
  }

  val myApp: ZIO[Redis, RedisError, Unit] =
    for {
      redis <- ZIO.service[Redis]
      r1    <- redis.set(s"string", "ç")
      _     <- ZIO.log(s"string was set? $r1")                // string was set? true
      r2    <- redis.get(s"string").returning[String]
      _     <- ZIO.log(s"string was gotten? ${r2.isDefined}") // this will never be printed
    } yield ()

  override def run = myApp.provide(
    Redis.layer,
    RedisExecutor.layer,
    ZLayer.succeed(RedisConfig.Default),
    ZLayer.succeed[CodecSupplier](ProtobufCodecSupplier),
  )

}
@mijicd mijicd added the bug Something isn't working label Nov 1, 2023
@mijicd mijicd added this to the 0.3.0 milestone Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants