Add support for IAsyncDisposable in managed objects#803
Add support for IAsyncDisposable in managed objects#803Code-Grump wants to merge 25 commits intomainfrom
Conversation
Add support for calling DisposeAsync on managed objects as well as Dispose
e77d9e2 to
9f73a4d
Compare
|
Because this is breaking, we have to wait for the v4 line to merge this, right? |
|
So this is an interesting position we find ourselves in. This change is unlikely to be breaking for general consumers - they just get a better lifecycle experience if they want to add it. Tests should continue to run without changes. For direct users of the API though, there are breaking changes to contracts: all the sync calls moving to async. If our position is that any API changes have to be backwards compatible or require a major version, this has to be a major version. |
Yes. The direct users we need to take care of are the plugins. It's very hard to track the plugin compatibility if we change the API that the plugins use within major versions. BUT: we don't have to wait 6 month to release a new major version. I think there is absolutely no problem releasing a new major version even every month. The v3 was maybe a bit special because the formatters were a single huge chunk. So changes like this could be accumulated and maybe early October we could release v4. |
…disposable-support
|
Repointed this PR to the branch it's dependant off. |
We're handling all synchronization properly in this class
|
Thank you for your effort. I am looking forward to using this feature. On a few dependencies we currently wrap |
🤔 What's changed?
Add support for calling DisposeAsync on objects managed by ObjectContainer. This supplements the existing Dispose support:
IAsyncDisposable, itsDisposeAsyncmethod will be called when the container is disposedIDisposeableitsDisposemethod will continue to be called unless it was cleaned up viaDisposeAsync⚡️ What's your motivation?
I am tired of trying to manually clean up
IAsyncDisposableobjects myself in my test suites. 😅🏷️ What kind of change is this?
📋 Checklist:
This text was originally taken from the template of the Cucumber project, then edited by hand. You can modify the template here.