-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Remove presumably-useless? serializability checks #80957
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: @dotnet/area-system-collections Issue DetailsCame across this when reading through the code during a debug session. Most of these checks (including the similar ones in Figured I'd file a PR just in case there was interest in cleaning this up. From a quick search it appears this may be the last usage of
|
This is really more @GrabYourPitchforks's call. I don't have a problem with removing these checks. It makes this consistent with However, there is one of two issues with this proposed change.
or
But whichever resolution is decided, I think the important thing is to keep consistent behavior between the two collection types - which are only used for Exception data as far as I can tell. |
Tagging subscribers to this area: @dotnet/area-system-runtime Issue DetailsCame across this when reading through the code during a debug session. Most of these checks (including the similar ones in Figured I'd file a PR just in case there was interest in cleaning this up. From a quick search it appears this may be the last usage of
|
src/coreclr/System.Private.CoreLib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs
Show resolved
Hide resolved
This would be a breaking change. I do not think we can justify making this breaking change now that these checks were removed years ago. |
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.
Thanks
Came across this when reading through the code during a debug session. Most of these checks (including the similar ones in
ListDictionaryInternal
) were removed some time ago, but this one wasn't behind a#if
, so perhaps there's a good reason to keep it around.Figured I'd file a PR just in case there was interest in cleaning this up.
From a quick search it appears this may be the last usage of
SR.Argument_NotSerializable
, so possibly that could be removed too if this is accepted.