-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Enable nullable annotations for M.E.L.Abstractions #43892
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
|
Tagging subscribers to this area: @maryamariyan |
src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LoggerExternalScopeProvider.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LogEntry.cs
Outdated
Show resolved
Hide resolved
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.
Note for reviewer: _values is not null due to what Count returns on line 76
src/libraries/Common/src/Extensions/TypeNameHelper/TypeNameHelper.cs
Outdated
Show resolved
Hide resolved
edae4e5 to
8df11e4
Compare
src/libraries/Common/src/Extensions/Logging/NullExternalScopeProvider.cs
Outdated
Show resolved
Hide resolved
...s/Microsoft.Extensions.Logging.Abstractions/ref/Microsoft.Extensions.Logging.Abstractions.cs
Outdated
Show resolved
Hide resolved
...s/Microsoft.Extensions.Logging.Abstractions/ref/Microsoft.Extensions.Logging.Abstractions.cs
Outdated
Show resolved
Hide resolved
...s/Microsoft.Extensions.Logging.Abstractions/ref/Microsoft.Extensions.Logging.Abstractions.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/Extensions/TypeNameHelper/TypeNameHelper.cs
Outdated
Show resolved
Hide resolved
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.
please make sure owner of this library double checks the annotations of the ref
...s/Microsoft.Extensions.Logging.Abstractions/ref/Microsoft.Extensions.Logging.Abstractions.cs
Outdated
Show resolved
Hide resolved
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.
Did you intend to check in these changes?
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.
yes this was intentional otherwise wouldn't have been able to add NetCoreAppCurrent for the project I think.
cc: @safern
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 reason behind adding NetCoreAppCurrent for these projects was to have CI protection for the nullable annotations to actually be correct and not broken on by upcoming changes but to actually not ship that asset. However the only caveat that this brings is that by adding this I'm not sure if people can just clone the repo and build this project without pre building anything else which was an effort @ViktorHofer did in the past.
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.
yes this was intentional otherwise wouldn't have been able to add NetCoreAppCurrent for the project I think.
This property is for convenience only, in case you don't want to list all the individual assembly references. In this case I think it's fine as we don't ship the `$(NetCoreAppCurrent)' asset.
However the only caveat that this brings is that by adding this I'm not sure if people can just clone the repo and build this project without pre building anything
Unfortunately with our current infra that's true but I don't think we should see that as a blocker. I would like to improve our infra so that $(NetCoreAppCurrent) builds via dependencies without an up-front build which would also enable VS builds for .NETCoreApp without up-front steps.
stephentoub
left a comment
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.
Overall LGTM.
src/libraries/Microsoft.Extensions.Logging.Abstractions/src/LogEntry.cs
Outdated
Show resolved
Hide resolved
krwq
left a comment
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 with some questions
70e6b56 to
c3e738b
Compare
to allow annotations on relevant projects, not yet enabled
c3e738b to
0ad32e6
Compare
|
@stephentoub @krwq @tarekgh looked at all the comments and made all the changes I was planning to do. I posed this question in #43892 (comment) too.
let me know what you think. |
|
Updates on PR since it was last reviewed:
|
|
@stephentoub @krwq could you please re-review? |
...Microsoft.Extensions.DependencyInjection/src/Microsoft.Extensions.DependencyInjection.csproj
Show resolved
Hide resolved
…ons-null Conflicts: src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj
|
Hello @maryamariyan! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
@maryamariyan, doesn't the ref csproj need |
cc: @buyaa-n @safern
Related to #43605