[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 |
@maxkoshevoi - is annotating System.Diagnostics.EventLog something you would be interested in doing as well? If not, that is totally fine. |
eerhardt
left a comment
There was a problem hiding this comment.
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 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.
LGTM. @eerhardt not sure what happened with the CI here.
Related to #43605
Questions:
BeginScopeshould be annotated withwhere TState : notnull, but it cannot, since it's not annotated this way inILoggerruntime/src/libraries/Microsoft.Extensions.Logging.TraceSource/src/TraceSourceLogger.cs
Line 73 in 3e2a45c
Microsoft.Extensions.Logging.EventLogcannot be annotated sinceSystem.Diagnostics.EventLogis not annotated yet. Should something be done about it, or let it be for now?