devsisters / shardcake

Sharding and location transparency for Scala
https://devsisters.github.io/shardcake/
Apache License 2.0
389 stars 30 forks source link

Why GrpcShardingService.layer returns Unit, it breaks type safe #57

Closed liewhite closed 1 year ago

liewhite commented 1 year ago

Missing GrpcShardingService.live provide will cause exception at runtime

ghostdogpr commented 1 year ago

This is a normal pattern with ZIO 2: the provide macro will warn you when you provide layers that are not used, but layers that return Unit are accepted. The service itself it not used by anything so we don't need to return it.

liewhite commented 1 year ago

Tks for your explanation, close the issue.