package’s type cannot be used as the vendored package’s type

The solution here seems to be that the library I’m trying to use needs to be reworked to prevent this kind of thing from happening.

The two possible ways to change the library seem to be

1) not vendor at all – this works if the dependency does not need to be a specific version.

2) vendored, but do not expose the vendored library to the public. Create some wrapper functions in the library so that people can create the types indirectly.

See this discussion about vendoring on reddit for more ideas/reasons why.

Leave a Comment