zio-intellij
zio-intellij copied to clipboard
@mockable annotation does not show correct type information ZIO 2.0 RC5
Using @mockable
all the type information about parameters etc is all missing. It always compiles and runs successfully, it seems to be syntax highlighting + code options.
ZIO 2.0 RC5 zio-mock 1.0.0 RC5 Scala 2.13.8
@mockable[ClientStore]
object ClientStoreMock2
trait ClientStore {
def upsert(client: Client): RIO[DataSource, Long]
}
IntelliJ IDEA 2022.1 (Community Edition)
Build #IC-221.5080.210, built on April 12, 2022
Runtime version: 11.0.14.1+1-b2043.25 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 12
Registry:
scala.erase.compiler.process.jdk.once=false
Non-Bundled Plugins:
org.intellij.scala (2022.1.13)
zio.intellij.zio-intellij (2022.1.16.0)
Kotlin: 221-1.6.20-release-285-IJ5080.210
I believe I experience the same issue with exactly the same versions:
Hi @Ellzord Thanks for this report as well :) I believe the issue was fixed here https://github.com/zio/zio-intellij/pull/376
import zio._
import zio.mock.Expectation.value
import zio.mock.mockable
import zio.test.Assertion.equalTo
trait DataSource
trait Client
trait ClientStore {
def upsert(client: Client): RIO[DataSource, Long]
}
object test {
@mockable[ClientStore]
private object ClientStoreMock2
private val client: Client = ???
ClientStoreMock2.Upsert(equalTo(client), value(1L))
}
Feel free to re-open MR if the issue is still reproducible for you