-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more boilerplate for has.Length() and is.Nil() after upgrade 1.1.0 release #9
Comments
My apologies for breaking your project, my version change should probably have been a 2.0.x version in hindsight. It was a bigger change than I anticipated, but I believed that the changes would be mostly compatible with minor tweaks. As mentioned in the readme, several things have changed since 1.0.x with generics, and whilst most of the API should remain similar with minimal changes, things like The problem with Nil and Length is they can work on a number of entirely different types. The compiler, it seems, cannot determine the type itself (and I'm not entirely sure why). Without performing the same surgery on Nil and Length as was done on ValueContaining, I'm not sure if what you are requesting is possible. I will have a look and see what can be done, and if you have any suggestions I'd be very grateful to receive a PR. Thanks again for your feedback 👍 |
It might be worth mentioning to that the old version, without generics, is still supported for now, and is available at version Thanks again for your support |
@nitram509 please have a look at the PR above, and let me know your thoughts? |
Hi, Regards |
Hi,
thank you for your continuous effort to maintain this great lib.
With the new 1.1.0 release, I read you implemented generics support.
I have to admit, without looking into the release notes, I did accept the PR from dependabot and was surprised, my pet project did not compile anymore.
May I share some feedback?
Introducing generics is good, but this breaking change should have been mentioned in the Release Notes.
Also, I don't like the extra boilerplate code, I have to write, just to make the compiler happy.
Is there a chance of introducing generics, with keeping the existing test code intact? And maybe omit the boilerplate code?
before (it works with gocrest 1.0.x
after (to make it work with gocrest 1.1.x
PS: the source, I'm talking about https://github.com/nitram509/ntgrrc/blob/main/poe_settings_test.go
Looking forward to hear your thoughts.
The text was updated successfully, but these errors were encountered: