-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Microsoft.AspNetCore.Http: Decorate priorFeature as nullable on StreamResponseBodyFeature ctor #38875
Conversation
The nullability change looks correct, we just need to fix the API file. If you open it in VS it should give you a tool hint to fix it automatically. It needs to show that the old API was removed. |
@Tratcher For some reason the VS hint only added it to unshipped, didn't remove from shipped. I just did that manually let me know if it looks good. |
@@ -1 +1,2 @@ | |||
#nullable enable | |||
Microsoft.AspNetCore.Http.StreamResponseBodyFeature.StreamResponseBodyFeature(System.IO.Stream! stream, Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature? priorFeature) -> void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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. 🤷🏽
Passing
null
forpriorFeature
seems to be a totally valid case forStreamResponseBodyFeature
but the parameter isn't flagged as nullable.What I want to do is this:
But to make it happy (as far as nullable analysis warnings go) I have to do: