-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[Group 4] Enable nullable annotations for Microsoft.Extensions.Logging.TraceSource
#66892
[Group 4] Enable nullable annotations for Microsoft.Extensions.Logging.TraceSource
#66892
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/area-extensions-logging Issue DetailsRelated to #43605 Questions:
|
We can still change it in ILogger, if that is the correct thing to do. Doing a real quick look, I think it is. BeginScope should also be annotated as returning runtime/src/libraries/Microsoft.Extensions.Logging.EventLog/src/EventLogLogger.cs Lines 51 to 54 in eb51b02
|
@maxkoshevoi - is annotating System.Diagnostics.EventLog something you would be interested in doing as well? If not, that is totally fine. |
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.
LGTM. Just two tiny comments.
src/libraries/Microsoft.Extensions.Logging.TraceSource/src/TraceSourceLogger.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Logging.TraceSource/src/TraceSourceLogger.cs
Outdated
Show resolved
Hide resolved
Sure, I was running out of things to annotate anyway 😄 |
For runtime/src/libraries/Microsoft.Extensions.Configuration.Xml/src/XmlDocumentDecryptor.cs Lines 92 to 102 in 000e1a8
I think it would be pretty easy to nullable annotate But if you wanted to annotate |
Yeah. It's not SO dead that we're not willing to nullable annotate it. 😄 (In fact, there's an open PR for fixing a bug in it.) |
@maryamariyan - did the CI run for this PR? |
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.
LGTM. @eerhardt not sure what happened with the CI here.
Related to #43605
Questions:
BeginScope
should be annotated withwhere TState : notnull
, but it cannot, since it's not annotated this way inILogger
runtime/src/libraries/Microsoft.Extensions.Logging.TraceSource/src/TraceSourceLogger.cs
Line 73 in 3e2a45c
Microsoft.Extensions.Logging.EventLog
cannot be annotated sinceSystem.Diagnostics.EventLog
is not annotated yet. Should something be done about it, or let it be for now?