Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup code autogen #863

Merged
merged 4 commits into from
Mar 12, 2020
Merged

Cleanup code autogen #863

merged 4 commits into from
Mar 12, 2020

Conversation

anguslees
Copy link
Contributor

Description of changes:

Refactor/cleanup only. Should have zero behavioural change.

  • Add a make generate target that just runs go generate.

  • Autogenerate protobuf files (rpc/rpc.pb.go). For reference, I used:

    % protoc --version
    libprotoc 3.0.0
  • Change mockgen invocation to execute the version of mockgen that
    matches the version we will compile against.
    (ie: Use go run github.com/golang/mock/mockgen ...)

  • Update to mockgen 1.4.1

Reviewer: I recommend reviewing this by individual commits. The last commit is the result of rerunning make generate.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mogren mogren self-requested a review March 10, 2020 15:49
@mogren
Copy link
Contributor

mogren commented Mar 10, 2020

Thanks @anguslees! It seems like the generated files have some different formatting, that's why the build failed:

Makefile:139: recipe for target 'check-format' failed

A make format on the generated commit should fix it.

Change mockgen invocation to execute the version of mockgen that
matches the version we will compile against.
(ie: Use `go run github.com/golang/mock/mockgen ...`)
Note order is important: we want to generate mocks based on the code
that protoc generates.
Output from `make generate`
Copy link
Contributor

@mogren mogren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, LGTM!

@jaypipes jaypipes merged commit 16813ea into aws:master Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants