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

Microsoft.AspNetCore.Http: Decorate priorFeature as nullable on StreamResponseBodyFeature ctor #38875

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Http/Http/src/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ Microsoft.AspNetCore.Http.StreamResponseBodyFeature.Dispose() -> void
Microsoft.AspNetCore.Http.StreamResponseBodyFeature.PriorFeature.get -> Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature?
Microsoft.AspNetCore.Http.StreamResponseBodyFeature.Stream.get -> System.IO.Stream!
Microsoft.AspNetCore.Http.StreamResponseBodyFeature.StreamResponseBodyFeature(System.IO.Stream! stream) -> void
Microsoft.AspNetCore.Http.StreamResponseBodyFeature.StreamResponseBodyFeature(System.IO.Stream! stream, Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature! priorFeature) -> void
Microsoft.AspNetCore.Http.StreamResponseBodyFeature.Writer.get -> System.IO.Pipelines.PipeWriter!
halter73 marked this conversation as resolved.
Show resolved Hide resolved
Microsoft.Extensions.DependencyInjection.HttpServiceCollectionExtensions
override Microsoft.AspNetCore.Http.BindingAddress.Equals(object? obj) -> bool
Expand Down
1 change: 1 addition & 0 deletions src/Http/Http/src/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#nullable enable
Microsoft.AspNetCore.Http.StreamResponseBodyFeature.StreamResponseBodyFeature(System.IO.Stream! stream, Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature? priorFeature) -> void
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Microsoft.AspNetCore.Http.StreamResponseBodyFeature.StreamResponseBodyFeature(System.IO.Stream! stream, Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature? priorFeature) -> void
*REMOVED*Microsoft.AspNetCore.Http.StreamResponseBodyFeature.StreamResponseBodyFeature(System.IO.Stream! stream, Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature! priorFeature) -> void
Microsoft.AspNetCore.Http.StreamResponseBodyFeature.StreamResponseBodyFeature(System.IO.Stream! stream, Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature? priorFeature) -> void

Copy link
Member

@halter73 halter73 Dec 8, 2021

Choose a reason for hiding this comment

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

You beat me to it! @dotnet/aspnet-build Any idea why the code fix doesn't do it this way automatically? Is it not supposed to?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure, @agocke do you know who we should consult with on the API analyzer?

Copy link
Contributor

@pranavkm pranavkm Dec 8, 2021

Choose a reason for hiding this comment

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

The codefix updates the shipping file as intended. For some reason our team insists it is wrong thing to do: #31076 (comment) even tho these files exist solely for the benefit of the tool. 🤷🏽

2 changes: 1 addition & 1 deletion src/Http/Http/src/StreamResponseBodyFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public StreamResponseBodyFeature(Stream stream)
/// </summary>
/// <param name="stream"></param>
/// <param name="priorFeature"></param>
public StreamResponseBodyFeature(Stream stream, IHttpResponseBodyFeature priorFeature)
public StreamResponseBodyFeature(Stream stream, IHttpResponseBodyFeature? priorFeature)
{
Stream = stream ?? throw new ArgumentNullException(nameof(stream));
PriorFeature = priorFeature;
Expand Down