-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/8.0] Return false from ComWrappers.Try... methods #90635
Conversation
Return false from ComWrappers.TryGetComInstance/TryGetObject instead of throwing PNSE. It saves callers from needing to protect against PNSE. Fix #90311
Tagging subscribers to this area: @dotnet/area-system-componentmodel Issue DetailsBackport of #90553 to release/8.0 /cc @jkotas Customer ImpactChange ComWrappers.TryGetComInstance/TryGetObject (new in .NET 8) to return false instead of throwing PlatformNotSupportedException when the ComWrappers feature is not supported. It is the case for Mono runtime currently. It saves callers of these APIs from worrying about the unsupported case and it matches the approach we take in many other "getter" APIs in unsupported features. TestingMono tests are failing in extra platform test runs due to this issue. Verified that the affected extra platform Mono tests are passing. RiskIMPORTANT: If this backport is for a servicing release, please verify that:
|
Tagging subscribers to this area: @dotnet/interop-contrib Issue DetailsBackport of #90553 to release/8.0 /cc @jkotas Customer ImpactChange ComWrappers.TryGetComInstance/TryGetObject (new in .NET 8) to return false instead of throwing PlatformNotSupportedException when the ComWrappers feature is not supported. It is the case for Mono runtime currently. It saves callers of these APIs from worrying about the unsupported case and it matches the approach we take in many other "getter" APIs in unsupported features. TestingMono tests are failing in extra platform test runs due to this issue. Verified that the affected extra platform Mono tests are passing. RiskIMPORTANT: If this backport is for a servicing release, please verify that:
|
This was approved for RC2 (release/8.0) via chat by @jeffschwMSFT . |
The wasm test failures are not related to this PR. The same tests are failing on other backport PRs. @carlossanlop Could you please merge it? |
Thank you @jkotas |
Backport of #90553 to release/8.0
/cc @jkotas
Customer Impact
Change ComWrappers.TryGetComInstance/TryGetObject (new in .NET 8) to return false instead of throwing PlatformNotSupportedException when the ComWrappers feature is not supported. It is the case for Mono runtime currently. It saves callers of these APIs from worrying about the unsupported case and it matches the approach we take in many other "getter" APIs in unsupported features.
Testing
Mono tests are failing in extra platform test runs due to this issue. Verified that the affected extra platform Mono tests are passing.
Risk
IMPORTANT: If this backport is for a servicing release, please verify that:
The PR target branch is
release/X.0-staging
, notrelease/X.0
.If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.