slachiewicz opened a new pull request, #3809:
URL: https://github.com/apache/thrift/pull/3809

   Fixes THRIFT-5420.
   
   `TestLogger` declared its parameter as `testing.TB`, which made `testing` a 
build dependency of `lib/go/thrift` itself: `go list -deps ./lib/go/thrift` 
listed `flag`, `runtime/trace` and `testing` before this change and lists none 
of them after.
   
   The parameter is now the single method the function calls:
   
   ```go
   func TestLogger(tb interface {
        Errorf(format string, args ...any)
   }) Logger
   ```
   
   A `*testing.T`, a `*testing.B` and a `testing.TB` all satisfy that, so 
existing callers compile unchanged. No exported identifier is added, which 
matters because the whole `Logger` API is already marked deprecated.
   
   `TestLibraryDoesNotImportTesting` parses the package's non-test files and 
fails if any imports `testing`, so the dependency cannot come back unnoticed.
   
   The alternative is to delete the deprecated `Logger` API outright, since it 
says it is no longer used by any library code. That is a breaking change and a 
separate decision, so this PR keeps the API and removes only the dependency.
   
   *This change was created with AI assistance.*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to