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

mockgen: prog_only mode ignoring write error #411

Closed
blico opened this issue Mar 13, 2020 · 1 comment · Fixed by #410
Closed

mockgen: prog_only mode ignoring write error #411

blico opened this issue Mar 13, 2020 · 1 comment · Fixed by #410

Comments

@blico
Copy link
Contributor

blico commented Mar 13, 2020

We are facing an issue where mockgen -prog_only ... is exiting successfully, but outputting an empty file.

In our repo's build system (Bazel), the call to mockgen -prog_only is a cacheable build action. Not returning a failure in the case mentioned becomes problematic because Bazel caches the build action's output whenever the underlying command succeeds (returned an exit code 0). Meaning when mockgen fails to write to stdout and does not exit with a failure, we end up uploading an incorrect build artifact to our cache.

@codyoss
Copy link
Member

codyoss commented Mar 13, 2020

Seems reasonable to me. Thanks.

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

Successfully merging a pull request may close this issue.

2 participants