lostluck commented on PR #26054:
URL: https://github.com/apache/beam/pull/26054#issuecomment-1493083817

   @johannaojeling FYI, I think go 1.20 breaks use of generic coder functions, 
since the type names no longer keep their new types. This affects the mongodbio 
types you produced. It's happened due to the various generic/fixes in 1.20, but 
definitely an unexpected result here.
   
   Raw output is here (search for `--- FAIL`): 
https://ci-beam.apache.org/job/beam_PreCommit_GoPortable_Phrase/189/consoleText
   
   ```
        decoding custom coder name:"mongodbio.idRangeRestriction" 
type:{kind:EXTERNAL 
external_key:"github.com/apache/beam/sdks/v2/go/pkg/beam/io/mongodbio.idRangeRestriction"}
 
enc:{name:"github.com/apache/beam/sdks/v2/go/pkg/beam/io/mongodbio.encodeBSON[...]"
 type:{kind:FUNC parameter_types:{kind:EXTERNAL 
external_key:"github.com/apache/beam/sdks/v2/go/pkg/beam/io/mongodbio.idRangeRestriction"}
 return_types:{kind:SLICE element:{kind:UINT8}} return_types:{kind:SPECIAL 
special:ERROR}}} 
dec:{name:"github.com/apache/beam/sdks/v2/go/pkg/beam/io/mongodbio.decodeBSON[...]"
 type:{kind:FUNC parameter_types:{kind:SLICE element:{kind:UINT8}} 
return_types:{kind:EXTERNAL 
external_key:"github.com/apache/beam/sdks/v2/go/pkg/beam/io/mongodbio.idRangeRestriction"}
 return_types:{kind:SPECIAL special:ERROR}}}
   ```
   
   Basically the function/type name ends up as:
   `github.com/apache/beam/sdks/v2/go/pkg/beam/io/mongodbio.encodeBSON[...]` 
for both the idRange and idRangeRestriction encode and decode functions.
   
   I'll send out work around PR which just adds explicit wrapper functions for 
now. But this is certainly an unexpected side effect of the generic functions 
on beam's registrations...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to