[SymbolManifestGenerator] Extend case-insensitive matching#5897
[SymbolManifestGenerator] Extend case-insensitive matching#5897mdh1418 wants to merge 3 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates symbol key generation and manifest correlation logic to tolerate runtime/special file names that differ by casing (e.g., CLR.DLL instead of clr.dll), which helps users with diagnostic artifacts that are not consistently lower-cased.
Changes:
- Make
PEFileKeyGeneratortreat runtime module names and CLR “special file” detection as case-insensitive. - Extend
SymbolManifestGeneratorcorrelated-file lookup to use case-insensitive filename matching (including detection of multiple candidates). - Add unit tests validating case-insensitive behavior for runtime keys, CLR keys, and identity keys.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/tests/Microsoft.SymbolStore.UnitTests/PEFileKeyGenerationTests.cs | Adds coverage for case-insensitive runtime/special file naming scenarios. |
| src/Microsoft.SymbolStore/KeyGenerators/PEFileKeyGenerator.cs | Implements case-insensitive comparisons for runtime module detection and CLR special-file classification. |
| src/Microsoft.SymbolManifestGenerator/SymbolManifestGenerator.cs | Updates correlated-file resolution to match adjacent/runtime special files case-insensitively and detect ambiguity. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| if ((flags & KeyTypeFlags.RuntimeKeys) != 0 && (GetFileName(_path) == CoreClrFileName || GetFileName(_path) == ClrFileName)) | ||
| string runtimeFileName = GetFileName(_path); | ||
| if ((flags & KeyTypeFlags.RuntimeKeys) != 0 && | ||
| (runtimeFileName.Equals(CoreClrFileName, StringComparison.OrdinalIgnoreCase) || |
There was a problem hiding this comment.
This logic is used on linux where we can't do case insensitive matching
There was a problem hiding this comment.
Should we only accept lower case coreclr.dll/clr.dll? or just have case insensitive matching on Windows?
There was a problem hiding this comment.
whats the background for this PR? My understanding is that these code paths would only be running when trying to do special indexing of files the .NET team produces so is this occurring in our own .NET build or somewhere else?
Some users have special diagnostic files that aren't lower-case, and the SymbolManifestGenerator logic currently expects exact lowercase matches.
This PR changes the logic to match files case-insensitive