-
Notifications
You must be signed in to change notification settings - Fork 37
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
Use v3 as delegate behind v2 interface. #149
Conversation
/cc @simolus3 I think this may be useful for many things:
wdyt? |
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #149 +/- ##
==========================================
- Coverage 87.40% 84.95% -2.45%
==========================================
Files 29 30 +1
Lines 2532 2605 +73
==========================================
Hits 2213 2213
- Misses 319 392 +73
☔ View full report in Codecov by Sentry. |
I think this is great to increase confidence in the v3 implementation by running it against unchanged tests, but some tests (like the "you don't need to await statements and it's completely fine" tests) are also testing implementation quirks. I don't really see much use in a perfect compatibility layer (which would likely be very hard to write anyway) when v3 is not just a new implementation, but hopefully also something we consider to be an improved API. I think we'll likely get most existing tests to pass with a compatibility layer written with a couple hours of effort (and that's worth it IMO), but getting every existing test to pass with this approach will be much harder.
Couldn't code waiting to be migrated just continue using version 2 of this package? If we continue exposing v2 APIs in an eventual |
I've extended the delegate a bit, but running the first tests against it already reveals things like trying to read private fields with reflection to capture internal state. I really don't see much value in the delegate when there will be a considerable effort required to migrate tests either way. With the tests I've migrated so far, they turned out to reveal actual issues in the new implementation which was very helpful. But so far, the experience of testing against a delegate has been pretty frustrating so I think it will be easier to migrate tests and then get a migration guide from the diff. |
I think we should improve the interface for the 95% of the tests, and mark non-trivial tests with
I was thinking an explicit break in |
Use the following to trigger v3 as delegate: