Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Make mockgen mock dependencies in vendor dir #99

Merged
merged 1 commit into from
Dec 6, 2017

Conversation

anfernee
Copy link
Contributor

Fix #4

@balshetzer
Copy link
Collaborator

This is similar to #28 but has the benefit of not having any conflicts and adds a test. #28 also addresses types in the vendored package. Does this PR do that too? There are also a couple of other differences but I'm not sure what the impact of those are.

The reason I haven't, yet, approved either is that I need to take some time to fully understand the way they solve the problem and the possible impact of the changes on existing users.

For example, the issue of the code being in read-only directories was raised in #28. I'm not sure if this is hypothetical or a practical concern.

@anfernee
Copy link
Contributor Author

Thanks @balshetzer. yes, this solves the same issue. The difference is it didn't hack the PkgPath result to remove the vendor part, it tried to "correct" its behavior but registering the gob with the right name.
I am not sure about a read-only tree. Eventually mockgen is going to write the mock files in the project most of the time, so it should be writable. Again, I am not sure.

@anfernee
Copy link
Contributor Author

@balshetzer I almost forgot this PR. Any concerns?

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 this pull request may close these issues.

2 participants