[ 
https://issues.apache.org/jira/browse/BEAM-3612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16657601#comment-16657601
 ] 

Robert Burke commented on BEAM-3612:
------------------------------------

The various registration functions need to be resilient to registering the same 
type multiple times.

eg. Currently runtime.RegisterType panics, which is bad, since a type might be 
defined outside of the user's control, but they might use two shimmed packages 
that handle DoFns on that type for them, causing a collision. If the types are 
the same, then it doesn't matter if they're registered multiple times.

That said, according to the reflect godoc: https://golang.org/pkg/reflect/#Type
 // String returns a string representation of the type.
 // The string representation may use shortened package names
 // (e.g., base64 instead of "encoding/base64") and is not
 // guaranteed to be unique among types. *To test for type identity,*
 *// compare the Types directly.*
 String() string



 

> Make it easy to generate type-specialized Go SDK reflectx.Funcs
> ---------------------------------------------------------------
>
>                 Key: BEAM-3612
>                 URL: https://issues.apache.org/jira/browse/BEAM-3612
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-go
>            Reporter: Henning Rohde
>            Assignee: Robert Burke
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to