Skip to content

Attribute HttpListenerRequest.UserAgent as nullable#93405

Merged
ManickaP merged 1 commit intodotnet:mainfrom
TheMaximum:93033-httplistenerrequest-nullable-useragent
Oct 13, 2023
Merged

Attribute HttpListenerRequest.UserAgent as nullable#93405
ManickaP merged 1 commit intodotnet:mainfrom
TheMaximum:93033-httplistenerrequest-nullable-useragent

Conversation

@TheMaximum
Copy link
Contributor

Changed the datatype for HttpListenerRequest.UserAgent to be a nullable string to match internally and externally expected behaviour.

Fix #93033

Changed the datatype for HttpListenerRequest.UserAgent to be a nullable
string to match internally and externally expected behaviour.

Fix dotnet#93033
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Oct 12, 2023
@TheMaximum
Copy link
Contributor Author

@dotnet-policy-service agree

@ghost
Copy link

ghost commented Oct 12, 2023

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

Issue Details

Changed the datatype for HttpListenerRequest.UserAgent to be a nullable string to match internally and externally expected behaviour.

Fix #93033

Author: TheMaximum
Assignees: -
Labels:

area-System.Net.Http, community-contribution

Milestone: -

Copy link
Member

@ManickaP ManickaP left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for the contribution!
Dev inner loop failure is unrelated, this can be merged.

@ManickaP ManickaP merged commit 9b7c52f into dotnet:main Oct 13, 2023
@wfurt
Copy link
Member

wfurt commented Oct 13, 2023

is this breaking change since it is touching ref assembly? I don't think the risk is high but I suspect there may be impact for somebody. Any thought @karelz?

@ManickaP
Copy link
Member

This isn't breaking change as far as I know. cc @stephentoub

@stephentoub
Copy link
Member

This isn't breaking change as far as I know. cc @stephentoub

Changing a property that was returning string to one that returns string? can introduce new warnings, e.g. anyone with NRT enabled and was doing:

string ua = request.UserAgent;

will now get a new warning where they didn't previously, and if they have warnings-as-errors enabled, that will break the build.

So technically it is a breaking change. In the past we've typically just had a single catch-all breaking change notification about such nullability annotation changes. @jeffhandley, is there a process in place for aggregating all of these?

@jeffhandley
Copy link
Member

With as few of these types of breaking changes as we've had recently, we should just start documenting each of them individually. I recall @gewarren mentioning the aggegate approach also introduced challenges, but I don't recall the specifics.

I'm tagging this issue as needing a breaking change doc issue created. @ManickaP, it would be best for you to file the issue per the steps that the automated comment will provide. Here's a good reference example for the issue.

@jeffhandley jeffhandley added breaking-change Issue or PR that represents a breaking API or functional change over a previous release. needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet labels Nov 6, 2023
@ghost
Copy link

ghost commented Nov 6, 2023

Added needs-breaking-change-doc-created label because this PR has the breaking-change label.

When you commit this breaking change:

  1. Create and link to this PR and the issue a matching issue in the dotnet/docs repo using the breaking change documentation template, then remove this needs-breaking-change-doc-created label.
  2. Ask a committer to mail the .NET Breaking Change Notification DL.

Tagging @dotnet/compat for awareness of the breaking change.

@ManickaP
Copy link
Member

ManickaP commented Nov 6, 2023

dotnet/docs#37900

@gewarren
Copy link
Contributor

gewarren commented Nov 7, 2023

We did aggregate (most of) the nullability changes for .NET 6: https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/nullable-ref-type-annotation-changes. I think it makes sense to aggregate them unless they fall under different areas.

@jeffhandley jeffhandley removed the needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet label Nov 8, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
@karelz karelz added this to the 9.0.0 milestone May 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Net.Http breaking-change Issue or PR that represents a breaking API or functional change over a previous release. community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HttpListenerRequest.UserAgent should be attributed as nullable

8 participants