Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

System.Net.Primitives Resource Cleanup #16247

Merged
merged 1 commit into from
Feb 17, 2017

Conversation

morganbr
Copy link

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.

…omated source scanning tool. Of the original 776 strings, this keeps the 17 that were being used, saving around 100kb.
@stephentoub
Copy link
Member

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">
Copy link
Member

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

@morganbr
Copy link
Author

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]
17:30:26 System.Net.Sockets.SocketException : Connection reset by peer
17:30:26 Stack Trace:
17:30:26 /mnt/j/workspace/dotnet_corefx/master/ubuntu14.04_release_prtest/src/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs(899,0): at System.Net.Sockets.Tests.DualModeBeginAccept.DualModeConnect_BeginAccept_Helper(IPAddress listenOn, IPAddress connectTo)

@stephentoub
Copy link
Member

@dotnet-bot test Innerloop Ubuntu14.04 Release Build and Test please

@stephentoub
Copy link
Member

Any chance this is unrelated flakiness?

Yes, a high chance.
FYI, @steveharter, @Priya91

I'm running the leg again...

@danmoseley
Copy link
Member

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.

@Priya91
Copy link
Contributor

Priya91 commented Feb 17, 2017

We've not seen that networking test fail before. It's looks new

cc @steveharter

@stephentoub stephentoub merged commit 47986c2 into dotnet:master Feb 17, 2017
@morganbr morganbr deleted the NetPrimitivesResources branch February 17, 2017 03:14
@morganbr
Copy link
Author

@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.

@karelz karelz modified the milestone: 2.0.0 Feb 22, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…ources

System.Net.Primitives Resource Cleanup

Commit migrated from dotnet/corefx@47986c2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants