Skip to content
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

Bump SimpleInjector from 5.1.0 to 5.2.0 #151

Merged
merged 1 commit into from
Dec 16, 2020

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 16, 2020

Bumps SimpleInjector from 5.1.0 to 5.2.0.

Release notes

Sourced from SimpleInjector's releases.

Simple Injector v5.2

This release is available through Nuget.

This minor release implements the following work items:

  • #873 Verification fails with IAsyncDisposable registrations
  • #867 Prevent Microsoft.Bcl.AsyncInterfaces dependency

The most important change in this minor release is #867, which solves the binding redirect issues that users have reported since the introduction of v5. This is done by removing the Microsoft.Bcl.AsyncInterfaces NuGet package dependency (#867). Unfortunately, this forces the following breaking changes in the core library:

  • [BREAKING] The Scope.RegisterForDisposal(IAsyncDisposable) method is removed and replaced with a Scope.RegisterForDisposal(object) overload.
  • [BREAKING] In the .NET Standard 2.0 and .NET 4.6.1 builds of Simple Injector, Container and Scope no longer implement IAsyncDisposable effectively removing Container.DisposeAsyc() and Scope.DisposeAsync() from those builds.

These breaking changes were required because the removal of the Microsoft.Bcl.AsyncInterfaces dependency disallows Simple Injector types to implement IAsyncDisposable. Fortunately, unless you were calling DisposeAsync yourself, an upgrade to Simple Injector v5.2 is likely a graceful one. For a more detailed discussion on what the problem was, please read our blog post.

The problem was urgent enough to force these breaking changes on a minor release, instead of making this into a major release, which takes much more planning and time.

NOTE: Do note that if you are using ASP.NET Core, you must upgrade the ASP.NET Core integration packages as well. The old packages will break with v5.2.

This doesn't mean, though, that asynchronous disposal isn't possible anymore. On the contrary actually. Where previous minor releases only allowed asynchronous disposal in the .NET 4.6.1, .NET Standard 2.0, and .NET Standard 2.1 builds of Simple Injector, asynchronous disposal is now supported in all builds. To make this possible, the following additions have been made:

  • The pre-.NET Standard 2.1 builds of Simple Injector apply duck typing internally to recognize types that implement IAsyncDisposable. This means that Simple Injector checks if your type implements an interface named "System.IAsyncDisposable". Upon disposal, Simple Injector expects that interface to contain an DisposeAsync method. That method should either return Task, or ValueTask. This means that you can either let your application depend on Microsoft.Bcl.AsyncInterfaces or define the interface yourself. As always, we ensured maximum performance; even this duck typing is blazingly fast.
  • The .NET Standard 2.1 build of Simple Injector skips duck typing and simply expects a asynchronous disposable type to implement the official IAsyncDisposable. .NET Standard 2.1 (which means you're either running .NET Core 3 or .NET 5) is provided out of the box.
  • A new Task Container.DisposeContainerAsync() method is added to allow disposing of the Container in an asynchronous fashion.
  • A new Task Scope.DisposeScopeAsync() method is add to allow disposing of the Scope in an asynchronous fashion.
  • A new object[] Scope.GetAllDisposables() method is added to allow retrieving all disposables instances that were created by a Scope. The list will return both IDisposable and IAsyncDisposable implementations.
Commits
  • 622428f Silly bug fixed.
  • 32d9416 Reset VersionPrefix.
  • b7d2239 Tests added several bug fixes. Fixes #873
  • f52fd4f Removed Microsoft.Bcl.AsyncInterfaces dependency from NuGet package.
  • ce4baa0 Downgraded tests to Microsoft.Bcl.AsyncInterfaces because PartialTestRunning ...
  • 6f5ad96 A call to Verify() (either implicitly or explicitly) will not cause an except...
  • 5718f6b Reimplemented how Simple Injector handles async disposal. Microsoft.Bcl.Async...
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [SimpleInjector](https://github.com/simpleinjector/SimpleInjector) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/simpleinjector/SimpleInjector/releases)
- [Commits](simpleinjector/SimpleInjector@5.1.0...5.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Dec 16, 2020
@iancooper iancooper merged commit 7b07e80 into master Dec 16, 2020
@dependabot dependabot bot deleted the dependabot/nuget/SimpleInjector-5.2.0 branch December 16, 2020 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant