zio-intellij icon indicating copy to clipboard operation
zio-intellij copied to clipboard

@mockable annotation does not show correct type information ZIO 2.0 RC5

Open Ellzord opened this issue 2 years ago • 1 comments

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]
}

image

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

Ellzord avatar May 05 '22 09:05 Ellzord

I believe I experience the same issue with exactly the same versions: image

ipetkovic avatar May 13 '22 08:05 ipetkovic

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))
}

image Feel free to re-open MR if the issue is still reproducible for you

myazinn avatar Mar 13 '23 21:03 myazinn