-
Notifications
You must be signed in to change notification settings - Fork 609
mockgen always tries to pull latest version instead of required version(go.mod without vendor) in docker golang:1.13 #354
Comments
@tocrafty That sounds that you invoked the Can you share a reproducer? There are many edge cases to using mockgen with modules. And the behavior is quite subtle (especially when you are not explicitly setting the |
This is a test to reproduce the bug. mockgen_test is a simple project with only one golang interface To mock the interface
and
|
I can reproduce this. Let me look into this. |
Let me layout the root cause of the bug. I don't have a fix yet - I need to think a bit more what approach to take. When we are reflecting a module/package (in your case mockgen_test) we are running so called In docker image the process runs under root and this first attempt to run Without docker the first attempt to run |
@tocrafty can you now retest with the latest mockgen?
|
@nguyenfilip Seem not work. mockgen v1.4.0 still tryies to pull the latest version, not th version required in go.mod. |
@tocrafty Sorry I meant if you can try with master:
|
It worked. Thanks. |
docker image: golang:1.13
go version: go1.13.5
gomock version: all after v1.1.0
gomock work mode: reflect mode
However, in OSX, without docker, mockgen works well with go.mod. Very strange!
The text was updated successfully, but these errors were encountered: