Skip to content

Use go.uber.org/mock/gomock#468

Merged
norbertklawikowski merged 2 commits intolovoo:masterfrom
moment-technology:use-uber-gomock
Feb 21, 2025
Merged

Use go.uber.org/mock/gomock#468
norbertklawikowski merged 2 commits intolovoo:masterfrom
moment-technology:use-uber-gomock

Conversation

@owenniles
Copy link
Contributor

In this PR, I’ve replaced github.com/golang/mock/gomock with go.uber.org/mock/gomock. The original repository, github.com/golang/mock, appears to be unmaintained since June 2023. Its README recommends switching to Uber's fork, which is actively maintained.

image

github.com/hashicorp/go-multierror v1.1.1
github.com/stretchr/testify v1.8.4
github.com/syndtr/goleveldb v1.0.0
go.uber.org/mock v0.4.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Version v0.4.0 of go.uber.org/mock is the latest release compatible with the Go version specified in our go.mod file (1.20). Upgrading beyond v0.4.0 would require us to update the go directive to a newer Go version.

frairon
frairon previously approved these changes Feb 21, 2025
Use the pinned version of mockgen to generate mocks rather than
whatever's installed on the system.
@owenniles owenniles dismissed stale reviews from norbertklawikowski and frairon via 78c80bd February 21, 2025 14:02
@owenniles
Copy link
Contributor Author

@frairon @norbertklawikowski Just added one more commit to generate mocks using the pinned version of mockgen rather than the system version. This ensures that all contributors will use the same version of mockgen to generate mocks. It also means that contributors won't need a separate system installation of mockgen. All a contributor will need to do to regenerate mocks is invoke go generate.

Copy link
Contributor

@norbertklawikowski norbertklawikowski left a comment

Choose a reason for hiding this comment

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

👍

@owenniles
Copy link
Contributor Author

@norbertklawikowski I'll rebase after #470 is merged to fix the failing CI?

@norbertklawikowski
Copy link
Contributor

@owenniles I ran the tests successfully locally, so I will merge :) Thanks for your work!

@norbertklawikowski norbertklawikowski merged commit 2fcfc2f into lovoo:master Feb 21, 2025
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants