-
Notifications
You must be signed in to change notification settings - Fork 3
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
Upgrade to ZIO 2 #48
base: master
Are you sure you want to change the base?
Upgrade to ZIO 2 #48
Conversation
@@ -22,7 +21,6 @@ object KafkaExplorerSpec extends DefaultRunnableSpec: | |||
|
|||
val layer = | |||
Clock.live >+> | |||
Blocking.live >+> | |||
itlayers.kafkaContainer >+> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we skip over composing layers live this and use the ZLayer.make
with automatic injection?
@@ -16,19 +15,19 @@ import org.apache.kafka.clients.consumer.OffsetResetStrategy | |||
|
|||
object KafkaProducerSpec extends DefaultRunnableSpec: | |||
|
|||
private val consumerLayer: ZLayer[Has[KafkaContainer], Nothing, Has[KafkaConsumer]] = | |||
Clock.live ++ Blocking.live ++ itlayers.clusterConfig(clusterId = "cluster_id") >>> KafkaConsumer.liveLayer | |||
private val consumerLayer: ZLayer[KafkaContainer, Nothing, KafkaConsumer] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same comment here: should we try automatic layer creation without operators?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why would that be necessary, if possible I would use operators to speed up compile time
@@ -31,10 +30,10 @@ object itlayers: | |||
) | |||
.toManaged_ | |||
|
|||
def consumerLayer(cgroup: String): ZLayer[Has[KafkaContainer] with Clock with Blocking, Nothing, Has[Consumer]] = | |||
def consumerLayer(cgroup: String): ZLayer[KafkaContainer with Clock , Nothing, Consumer] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we write KafkaContainer & Clock
instead of KafkaContainer with Clock
?
|
||
object Logger { | ||
|
||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens with logging? should we delete this object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging is not yet ported to zio2
|
||
object Config extends Newtype[(String, String)] | ||
type Config = Config.Type | ||
opaque type Config = (String, String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we build c-tors within companion objects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see another PR with latest zio updated. Should we bring to speed this PR to have a separate scope or close this?
No description provided.