File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
scio-avro/src/main/scala/com/spotify/scio/avro/types Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -110,10 +110,13 @@ private[types] object SchemaProvider {
110110 }
111111
112112 private def fieldDoc (t : Type ): Iterable [Option [String ]] = {
113- val tpe = " com.spotify.scio.avro.types.doc"
113+ // Scala 2.13.17+ resolves annotation type using `com.spotify.scio.avro.doc` alias; previous Scala
114+ // versions (and all 2.12 versions) resolve to `com.spotify.scio.avro.types.doc`
115+ // See: https://github.com/spotify/scio/issues/5874
116+ val tpes = Set (" com.spotify.scio.avro.types.doc" , " com.spotify.scio.avro.doc" )
114117 t.typeSymbol.asClass.primaryConstructor.typeSignature.paramLists.head.map {
115118 _.annotations
116- .find(_. tree.tpe.toString == tpe )
119+ .find(a => tpes.contains(a. tree.tpe.toString) )
117120 .map { a =>
118121 val q " new $_( $v) " = a.tree: @ nowarn
119122 val Literal (Constant (s)) = v : @ nowarn
You can’t perform that action at this time.
0 commit comments