Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Vendoring in Go 1.6 breaks gob registration #804

Closed
jcooklin opened this issue Mar 24, 2016 · 0 comments · Fixed by #801
Closed

Vendoring in Go 1.6 breaks gob registration #804

jcooklin opened this issue Mar 24, 2016 · 0 comments · Fixed by #801

Comments

@jcooklin
Copy link
Collaborator

When using vendoring in Go 1.6, reflection is in gob.Register to create
a key for type lookups. This reflect.PkgPath() call returns a "globally
unique" key for looking up types, and in the case of a vendored type, is
not valid for matching gob registration names. This is because on the
server side, the type is registered as import/path.(typename), but on
the client side (vendored) it looks like
client/vendor/import/path.(typename). Using fixed keys bypasses the
need for reflection and is safe on either side, even when using
vendoring.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant