Bugs/improvements on union interfaces, diff displaying and version setting #102
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this pr i introduce 3 bugs/improvements:
We have to update gowrap when pr Support of union and type approximation in generics hexdigest/gowrap#86 is merged, to fix generation of interfaces with unions and type approximations.
Improvement with diff displaying: when test fails because expectations failed and we used minimock.Anycontext, the diff will show arguments that are different as well as context argument, e.g.
It is very confusing for developers as they think that there is also some issue with context, that anyContext is not working. So i improved diff displaying in that way that it wont show difference between context if anyContext is used, e.g.
--version
or setting it in generated code. The issue is that if you install minimock binary with go install, the version is set to 'dev', so in generated code minimock version is set to 'dev' making it impossible to understand which version of minimock has generated code, e.g.So in this pr if version is not set, we will take version and commit from debug.ReadBuildInfo() .