Skip to content
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

Importing protobuf Any breaks coder derivation #5410

Closed
kellen opened this issue Jun 27, 2024 · 0 comments · Fixed by #5434
Closed

Importing protobuf Any breaks coder derivation #5410

kellen opened this issue Jun 27, 2024 · 0 comments · Fixed by #5434

Comments

@kellen
Copy link
Contributor

kellen commented Jun 27, 2024

import com.google.protobuf.Any // if imported, will throw a coder error below
case class A(userId: Int)
object Job {
  def main(cmdlineArgs: Array[String]): Unit = {
    implicitly[com.spotify.scio.coders.Coder[A]]
  }
}

Throws:

[error] Cannot find an implicit Coder instance for type:
[error]
[error]   >> A

Aliasing the import or using the fully resolved class name sidesteps the issue

import com.google.protobuf.{Any => GAny}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant