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

[release/8.0] Return false from ComWrappers.Try... methods #90635

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 15, 2023

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, not release/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.

jkotas added 2 commits August 15, 2023 20:31
Return false from ComWrappers.TryGetComInstance/TryGetObject instead of
throwing PNSE. It saves callers from needing to protect against PNSE.

Fix #90311
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 15, 2023
@jkotas jkotas added area-System.ComponentModel area-System.Runtime.InteropServices and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners area-System.ComponentModel labels Aug 15, 2023
@ghost
Copy link

ghost commented Aug 15, 2023

Tagging subscribers to this area: @dotnet/area-system-componentmodel
See info in area-owners.md if you want to be subscribed.

Issue Details

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, not release/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.

Author: github-actions[bot]
Assignees: -
Labels:

area-System.ComponentModel, needs-area-label

Milestone: -

@ghost
Copy link

ghost commented Aug 15, 2023

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

Issue Details

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, not release/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.

Author: github-actions[bot]
Assignees: -
Labels:

area-System.Runtime.InteropServices

Milestone: -

@carlossanlop carlossanlop added the Servicing-approved Approved for servicing release label Aug 15, 2023
@carlossanlop
Copy link
Member

This was approved for RC2 (release/8.0) via chat by @jeffschwMSFT .

@jkotas
Copy link
Member

jkotas commented Aug 16, 2023

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?

@carlossanlop carlossanlop merged commit b33c596 into release/8.0 Aug 16, 2023
@carlossanlop carlossanlop deleted the backport/pr-90553-to-release/8.0 branch August 16, 2023 14:26
@ericstj
Copy link
Member

ericstj commented Aug 16, 2023

Thank you @jkotas

@ghost ghost locked as resolved and limited conversation to collaborators Sep 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants