Skip to content

Conversation

@dolmen
Copy link

@dolmen dolmen commented Mar 7, 2024

The Testify project has unfortunately exposed types AnythingOfTypeArgument and IsTypeArgument which should have stayed implementation details. They should have been private types hidden behind an interface.
Those types have function constructors that must be used instead:

The references to those concrete types in downstream projects are blocking the cleanup of the Testify API.

appy/mock unfortunately propagate those mistakes. The appy project contains the only public reference to mock.IsTypeArgument on the whole GitHub: https://github.com/search?q=mock.IsTypeArgument+language%3Ago&type=code

... but it is not used beyond being exposed on the appy/mock package.

So this patch just deletes the two references to AnythingOfTypeArgument and IsTypeArgument in package mock.

Note: I'm a co-maintainer of the Testify project.

The Testify project (github.com/stretchr/testify/mock) has unfortunately exposed types AnythingOfTypeArgument and IsTypeArgument which should have stayed implementation details. They should have been private types hidden behind an interface. Those types have function constructors that must be used instead: mock.AnythingOfTypeArgument("string") -> mock.AnythingOfType("string") *mock.IsTypeArgument The references to those concrete types in downstream projects are blocking the cleanup of the Testify API. appy/mock unfortunately propagate those mistakes. The appy project contains the only public reference to mock.IsTypeArgument on the whole GitHub: https://github.com/search?q=mock.IsTypeArgument+language%3Ago&type=code ... but it is not used beyond being exposed on the appy/mock package. So this patch just deletes the two references to AnythingOfTypeArgument and IsTypeArgument.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant