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

Fix some null annotations on IDynamicFileInfoProvider #67141

Merged

Conversation

jasonmalinowski
Copy link
Member

The only "interesting" annotation here is we're now potentially calling the providers with a null project file path; there's nothing that generally prevented that from happening before, so I'm updating annotations to match.

The only "interesting" annotation here is we're now potentially calling
the providers with a null project file path; there's nothing that
generally prevented that from happening before, so I'm updating
annotations to match.
@@ -17,16 +17,15 @@ internal interface IRazorDynamicFileInfoProvider
/// <param name="projectId"><see cref="ProjectId"/> this file belongs to</param>
/// <param name="projectFilePath">full path to project file (ex, csproj)</param>
/// <param name="filePath">full path to non source file (ex, cshtml)</param>
/// <returns>null if this provider can't handle the given file</returns>
Copy link
Member Author

Choose a reason for hiding this comment

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

So this comment was copied from the IDynamicFileInfoProvider interface which is the regular one -- however the wrapper never handled a null return from Razor, so this wasn't in practice the contract being enforced. I've updated this to match code behavior.

@jasonmalinowski jasonmalinowski self-assigned this Mar 2, 2023
@jasonmalinowski jasonmalinowski merged commit 3f12400 into dotnet:main Mar 2, 2023
@ghost ghost added this to the Next milestone Mar 2, 2023
@jasonmalinowski jasonmalinowski deleted the null-annotate-dynamic-files branch March 2, 2023 18:37
@allisonchou allisonchou modified the milestones: Next, 17.6 P3 Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants