-
Notifications
You must be signed in to change notification settings - Fork 4.9k
System.Net.Primitives Resource Cleanup #16247
Conversation
…omated source scanning tool. Of the original 776 strings, this keeps the 17 that were being used, saving around 100kb.
Thanks for doing this, @morganbr! A while back I'd opened an issue (https://github.com/dotnet/corefx/issues/11504) highlighting several thousand of these, many of which were in System.Net.Primitives, but we closed it at the time given that we were adding back a bunch of APIs for 2.0. Now that we've done that, now seems like a good time to cull these out. |
</data> | ||
<data name="net_WebHeaderInvalidHeaderChars" xml:space="preserve"> | ||
<value>Specified value has invalid HTTP Header characters.</value> | ||
<data name="net_container_add_cookie" xml:space="preserve"> |
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.
I assume these "adds" are just an artifact of the diff, and you're really only just deleting stuff?
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.
Yep
The Ubuntu failure doesn't really look like a resource issue. Any chance this is unrelated flakiness? System.Net.Sockets.Tests.DualModeBeginAccept.BeginAcceptV4BoundToAnyV4_Success [FAIL] |
@dotnet-bot test Innerloop Ubuntu14.04 Release Build and Test please |
Yes, a high chance. I'm running the leg again... |
Morgan would you consider running the tool over the other CoreFX resx's? Or sharing the tool? This is something I was going to do myself at some point. I was about to do it for corelib, with regexes. |
We've not seen that networking test fail before. It's looks new cc @steveharter |
@danmosemsft , I'm happy to share the tool if you can suggest a good way to do it. It's not particularly bright -- it just takes a set of directories and runs a regex to find usage of the SR class in C# files and then edits any resx files it finds in them. I thought about a Roslyn analyzer, but I realized that wouldn't work as well since a string might only be used in a particular build flavor. |
…ources System.Net.Primitives Resource Cleanup Commit migrated from dotnet/corefx@47986c2
Cleanup of string resources for System.Net.Primitives based on an automated source scanning tool. Of the original 776 strings, this keeps the 17 that were being used, saving at least 100kb. Github's diffing is showing additions, but there are no actual additions or edits, just removals. Verification was build+unit tests, based on the assumption that all resource strings were accessed via the SR class, and any missing resources would break the build.