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.
-
Actual behavior
When using the Ginkgo test framework, there's only a single
TestXXX
function. This function call all other test functions written in the Ginkgo framework. When using gomock, users will need to manually call thegomock.Controller.Finish
method after each test.Expected behavior
gomock.Controller.Finish
needs to be available, and needs to remain so in the future. #50 deprecated this function, which makesstaticcheck
emit errors on my test code. That's ok (I can addnolint
directives), 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