Skip to content

Conversation

ManickaP
Copy link
Member

@ManickaP ManickaP commented Jun 12, 2024

This should make the IsSupported properties not trigger the compiler warning about using unsupported API, in other words avoiding this:

warning CA1416: This call site is reachable on all platforms. 'QuicListener.IsSupported' is only supported on: 'linux', 'macOS/OSX', 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

for a simple:

if (QuicListener.IsSupported)
{
    ...
}

We might even try if we could get away with using the QuicConnection.IsSupported as a trimming guard (instead of IsHttp3Supported()) in HTTP code.

EDIT: Analyzer is in main. PR as a draft for now since it depends on dotnet/roslyn-analyzers#7326

@ghost
Copy link

ghost commented Jun 12, 2024

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

ghost commented Jun 12, 2024

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

Copy link
Contributor

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

@ManickaP ManickaP force-pushed the quic-platform-guard branch from 1ffd525 to 3e7cc3d Compare June 17, 2024 12:11
@ManickaP ManickaP marked this pull request as ready for review June 17, 2024 12:11
Copy link
Member

@rzikm rzikm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@buyaa-n buyaa-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably no need to add the attributes into generated files (QuicConnection.Unsupported.cs, QuicListener.Unsupported.cs), anyway if/when they regenerated the attributes will not be there.

@ManickaP
Copy link
Member Author

generated files (QuicConnection.Unsupported.cs, QuicListener.Unsupported.cs)

They're not generated though, their content is on PNSE exclusion list and these sources are used instead.

@ManickaP
Copy link
Member Author

/ba-g wasm failure reported here: #103623

@ManickaP ManickaP merged commit 3620294 into dotnet:main Jun 18, 2024
@ManickaP ManickaP deleted the quic-platform-guard branch June 18, 2024 08:21
@karelz karelz added this to the 9.0.0 milestone Jun 24, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 25, 2024
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