-
Notifications
You must be signed in to change notification settings - Fork 94
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
Replace NormalizeWhitespace with manually generated whitespace #303
Conversation
Simplest test passes at this point.
Fixes a regression introduced by 8c6685a
@AArnott XML doc comments on types look messed up (on 4287105): namespace RestartManager
{
/// <summary>Uniquely identifies a process by its PID and the time the process began.</summary>
/// <remarks>
/// <para>The <b>RM_UNIQUE_PROCESS</b> structure can be used to uniquely identify an application in an <a href="https://docs.microsoft.com/windows/desktop/api/restartmanager/ns-restartmanager-rm_process_info">RM_PROCESS_INFO</a> structure or registered with the Restart Manager session by the <a href="https://docs.microsoft.com/windows/desktop/api/restartmanager/nf-restartmanager-rmregisterresources">RmRegisterResources</a> function.</para>
/// <para><see href="https://docs.microsoft.com/windows/win32/api//restartmanager/ns-restartmanager-rm_unique_process#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
internal partial struct RM_UNIQUE_PROCESS
{
/// <summary>The product identifier (PID).</summary>
internal uint dwProcessId;
/// <summary>The creation time of the process. The time is provided as a <b>FILETIME</b> structure that is returned by the <i>lpCreationTime</i> parameter of the <a href="https://docs.microsoft.com/windows/desktop/api/processthreadsapi/nf-processthreadsapi-getprocesstimes">GetProcessTimes</a> function.</summary>
internal global::System.Runtime.InteropServices.ComTypes.FILETIME ProcessStartTime;
} |
Yup. And some statements aren't indented. Most of the feedback I got from roslyn and other folks during this PR was on how unreasonably generous I was in producing pretty syntax. The argument was that this code is hardly read, so it doesn't need to be pretty. I'd like to find a balance though, and get customer feedback (including from you) on where that balance is. |
I recently tested it with generating the enum MINIDUMP_TYPE and it resulted in all of the docs not rendering properly. I hope that despite that they will render properly when people consume my library with those docs with that enum being part of public api for it. As such properly spaced docs is a must for my code but only when it's placed on public apis. |
@AraHaan, I took a look at |
I see, was that image from inside of vs2019? |
Either that, or a VS 2022 preview, I don't remember. But it should be the same either way. |
For reasons of terrible perf (dotnet/roslyn#54144), we're replacing
NormalizeWhitespace()
with manually generated whitespace to fix the largest contributor to terrible perf as tracked by #244 and #38.Sample of manual whitespace generated so far on the simplest test: