scio icon indicating copy to clipboard operation
scio copied to clipboard

IntelliJ complains about lack of implicit Coders (bug introduced in Scio 0.14)

Open TJC opened this issue 4 months ago • 0 comments

When upgrading from Scio 0.13.4 to 0.14.0, I noticed an issue has appeared in IntelliJ.

In the following code, which produced no errors or warnings in 0.13.4, IntelliJ now complaints that

No implicits found for parameter coder$U$0: Coder[ExampleData] Import 'com.spotify.scio.coders.kryo.fallback' ? More actions...

If I remove the BigQueryType annotation, then the error changes to:

Ambiguous implicits for parameter coder$U$0: Coder[ExampleData] Import 'com.spotify.scio.coders.kryo.fallback' ? More actions...

I note that the code compiles just fine, though.

  @BigQueryType.toTable
  case class ExampleData(name: String, age: Int)

  def exampleFunc(data: SCollection[ExampleData]): SCollection[ExampleData] = {
    data.transform("example") { d =>
      d.map { dd =>
        dd.copy(age = dd.age + 1)
      }
    }
  }

TJC avatar Feb 14 '24 05:02 TJC