This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
krwq
reviewed
May 21, 2019
cston
reviewed
May 21, 2019
safern
reviewed
May 21, 2019
src/System.Private.CoreLib/shared/System/Collections/Generic/EqualityComparer.cs
Show resolved
Hide resolved
safern
reviewed
May 21, 2019
src/System.Private.CoreLib/shared/System/Collections/Generic/IDictionary.cs
Show resolved
Hide resolved
safern
reviewed
May 21, 2019
safern
reviewed
May 21, 2019
safern
reviewed
May 21, 2019
src/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.cs
Show resolved
Hide resolved
safern
reviewed
May 21, 2019
src/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationInfo.cs
Show resolved
Hide resolved
d714408
to
3579798
Compare
@MadsTorgersen, @jaredpar, @terrajobst, updated based on yesterday's review. It'd be great if you could help confirm that NullableAttributes.cs (https://github.com/dotnet/coreclr/pull/24679/files#diff-dae9d3bef16ae4885cceab78315f8619) is what we agreed to or not. |
3579798
to
db151dd
Compare
@safern, this is ready for review. |
Looking. |
safern
reviewed
May 24, 2019
safern
reviewed
May 24, 2019
src/System.Private.CoreLib/shared/System/Collections/Generic/Dictionary.cs
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
src/System.Private.CoreLib/shared/System/Collections/Generic/Dictionary.cs
Outdated
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
src/System.Private.CoreLib/shared/System/Collections/Generic/Dictionary.cs
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
src/System.Private.CoreLib/shared/System/Collections/Generic/List.cs
Outdated
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
safern
reviewed
May 24, 2019
src/System.Private.CoreLib/shared/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
Outdated
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
src/System.Private.CoreLib/shared/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
Outdated
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/TraceLogging/Statics.cs
Outdated
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/TraceLogging/Statics.cs
Outdated
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
safern
reviewed
May 24, 2019
src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
Outdated
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
src/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.NoCom.cs
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
safern
reviewed
May 24, 2019
safern
reviewed
May 24, 2019
safern
reviewed
May 24, 2019
src/System.Private.CoreLib/shared/System/Threading/Tasks/FutureFactory.cs
Outdated
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
...stem.Private.CoreLib/shared/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
safern
reviewed
May 24, 2019
safern
reviewed
May 24, 2019
src/System.Private.CoreLib/shared/System/Collections/Concurrent/ConcurrentQueueSegment.cs
Outdated
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
src/System.Private.CoreLib/shared/System/Collections/Generic/Dictionary.cs
Outdated
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
...stem.Private.CoreLib/shared/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs
Outdated
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
src/System.Private.CoreLib/shared/System/Threading/ThreadLocal.cs
Outdated
Show resolved
Hide resolved
safern
reviewed
May 24, 2019
...ate.CoreLib/src/System/Runtime/InteropServices/WindowsRuntime/EventRegistrationTokenTable.cs
Show resolved
Hide resolved
safern
approved these changes
May 24, 2019
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.
Left some comments, questions. I spotted one missing attribute in Version.TryParse
override. Overall LGTM.
Thanks for the review, Santi! |
db151dd
to
5258bb2
Compare
5258bb2
to
3145616
Compare
Dotnet-GitSync-Bot
pushed a commit
to Dotnet-GitSync-Bot/corert
that referenced
this pull request
May 28, 2019
* Add and apply nullable attributes * Adapt to API review decisions * Address PR feedback Signed-off-by: dotnet-bot <[email protected]>
Dotnet-GitSync-Bot
pushed a commit
to Dotnet-GitSync-Bot/mono
that referenced
this pull request
May 28, 2019
* Add and apply nullable attributes * Adapt to API review decisions * Address PR feedback Signed-off-by: dotnet-bot <[email protected]>
Dotnet-GitSync-Bot
pushed a commit
to Dotnet-GitSync-Bot/corefx
that referenced
this pull request
May 28, 2019
* Add and apply nullable attributes * Adapt to API review decisions * Address PR feedback Signed-off-by: dotnet-bot <[email protected]>
jkotas
pushed a commit
to dotnet/corert
that referenced
this pull request
May 28, 2019
* Add and apply nullable attributes * Adapt to API review decisions * Address PR feedback Signed-off-by: dotnet-bot <[email protected]>
marek-safar
pushed a commit
to mono/mono
that referenced
this pull request
May 28, 2019
* Add and apply nullable attributes * Adapt to API review decisions * Address PR feedback Signed-off-by: dotnet-bot <[email protected]>
stephentoub
added a commit
to Dotnet-GitSync-Bot/corefx
that referenced
this pull request
May 30, 2019
* Add and apply nullable attributes * Adapt to API review decisions * Address PR feedback Signed-off-by: dotnet-bot <[email protected]>
stephentoub
added a commit
to dotnet/corefx
that referenced
this pull request
May 30, 2019
* Add and apply nullable attributes * Adapt to API review decisions * Address PR feedback Signed-off-by: dotnet-bot <[email protected]>
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
* Add and apply nullable attributes * Adapt to API review decisions * Address PR feedback Commit migrated from dotnet/coreclr@4a12754
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates Corelib to use the nullable attributes proposed in https://github.com/dotnet/csharplang/blob/master/meetings/2019/LDM-2019-05-15.md and https://github.com/dotnet/corefx/issues/37826.
It also removes ~300 TODO-NULLABLE comments for things that we expect will persist for at least .NET Core 3.0 / C# 8:
Register(Action<object?>, object?)
, where we need to allow nulls, but if a lambda is used for the first argument and if we had a way to say that the argument to the lambda would be non-null if the object state were non-null, then the compiler could avoid null warnings on the lambda argument. In the future, in theory[NotNullIfNotNull("state")]
could be used if it could be applied to generic type arguments.out ArraySegment
was used and then the.Array
was producing potential null warnings. We will not have a way to express the constraint that the.Array
in this case will be non-null.bool throwOnFailure
, in which case the caller would know that the nullable return value would be non-null if that argument was set to true. We will not have a way to express that constraint.Debug.Assert(a is null || b is null)
). That's not going to happen for the foreseeable future, so I've removed such comments.I also cleaned up the remaining ~400 TODO-NULLABLE comments to make them consistent and searchable. What currently remains:
Some of these Roslyn issues have been fixed but are still showing up in Corelib, likely because we've not yet consumed the fixes.
A few open issues:
cc: @dotnet/nullablefc, @jkotas, @MadsTorgersen, @jaredpar, @jcouv, @cston