deprecation of Controller.Finish breaks certain test frameworks
#84
Replies: 2 comments 2 replies
-
|
Hey @marten-seemann , thanks for raising this issue. I believe we have a disagreement on what marking an API as Deprecated entails: From https://github.com/golang/go/wiki/Deprecated:
We merged #50 because we believe that calling I want to reiterate that marking this as deprecated does not mean that we will be eventually removing it. That is a breaking change, and we don't want to make any breaking changes to any of the public APIs of gomock. |
Beta Was this translation helpful? Give feedback.
-
|
It's very helpful if the document suggests that Finish() is no longer needed, depending on the Go version. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Actual behavior
When using the Ginkgo test framework, there's only a single
TestXXXfunction. This function call all other test functions written in the Ginkgo framework. When using gomock, users will need to manually call thegomock.Controller.Finishmethod after each test.Expected behavior
gomock.Controller.Finishneeds to be available, and needs to remain so in the future. #50 deprecated this function, which makesstaticcheckemit errors on my test code. That's ok (I can addnolintdirectives), but I'm worried that the deprecation is a first step to an eventual remove ofFinish, which would break my entire test setup in quic-go. (For the record, I'm not happy with Ginkgo, but that's what we're stuck with for the moment, see quic-go/quic-go#3652).Given that there are valid use cases of
Finish, the function should probably not deprecated at all. Instead, documentation could be added explaining that usually (i.e. when not using any test framework) it's not necessary to call that function.Additional Information
Triage Notes for the Maintainers
Beta Was this translation helpful? Give feedback.
All reactions