-
Notifications
You must be signed in to change notification settings - Fork 10.4k
enable nullable for new projects #32756
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
Conversation
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Pages/Error.cshtml
Outdated
Show resolved
Hide resolved
...emplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Pages/Error.cshtml
Outdated
Show resolved
Hide resolved
@danroth27 can you please confirm that we want to take this change in for our templates? Thanks! |
I would love to enable nullability, but I think we would enable it by default rather than make it a switch that a user has to choose. That said, I think there are some important pieces we would need to address before we did that:
The remainder of the framework is annotated enough (and we will cover more by 6.0) that users should find the experience productive. |
@pranavkm should this be closed or is there some set of projects we think its appropriate for? |
👍
Do we have tracking issues for these remaining work items? |
it is enabled by default. The |
@danroth27 There's #32783 |
@jmarolf I think the question is do we need a switch at all. Once we are at a place with ASP.NET Core that we can turn on nullability checks by default, is there really a need for users to have a switch to turn it off? |
I have no objections. I added the switch as a conservative measure. If we are comfortable just using this as the default that makes things simpler. |
@@ -7,7 +7,7 @@ | |||
<h1 class="text-danger">Error.</h1> | |||
<h2 class="text-danger">An error occurred while processing your request.</h2> | |||
|
|||
@if (Model.ShowRequestId) | |||
@if (Model?.ShowRequestId ?? false) |
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.
this looks kinda terrible.
Nullable was enabled by the other changes that went in today. |
resolves dotnet/templates#485