zio / zio-intellij

A companion IntelliJ IDEA plugin for the ZIO library ecosystem.
Apache License 2.0
210 stars 40 forks source link

ZLayer.derive improper behaviour #454

Open mateuszbrzezinski opened 8 months ago

mateuszbrzezinski commented 8 months ago

When you create layer using ZLayer.derive IDEA recognizes the type as:

val layer: ZLayer[Nothing, Any, KafkaConsumerImpl] = ZLayer.derive[KafkaConsumerImpl] which is wrong.

if I correct that manually to use proper environment dependency, to use some other service, code is ofc correct and compiles, but then IDE marks that line as error:

image

Seems current plugin implementation is not aware about derive macro yet.

hmemcpy commented 8 months ago

Thanks! I believe derive is a fairly recent addition, so we'd have to add support for it in the plugin. Thanks for reporting!