-
Notifications
You must be signed in to change notification settings - Fork 821
Create a separate MetadataReader for the PDB #3313
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
Create a separate MetadataReader for the PDB #3313
Conversation
Lack of support for full PDBs is a bummer. We had originally needed to mandate full PDBs for .NET Framework projects because that's what VSTest and/or Test Explorer required, but that requirement is extremely old and perhaps out of date now. So I wonder if we can just move forward with the recommendation of portable PDBs. Thoughts @Youssef1313 @nohwnd? |
(This is fundamentally a question as to whether |
@bradwilson Generally, Dia is only for full (Windows) PDBs. However, If the PDB file exists, we try to check if it's portable and then determine to use either |
I think the three variants should be supported by xunit (full, portable, and embedded). |
Well, then, that leaves me with three choices:
This is quite a mess we have here. 😂 |
Not to mention that I'm seeing hard Mono crashes when trying to use
|
@tmat is likely best to help. What I personally would do is to use caller info attributes and avoid reading PDB altogether. It is something I'm planning to explore for MSTest v4 (microsoft/testfx#5500). |
That doesn't work for F#, which is half the reason I introduced the Cecil-based source information provider. |
@bradwilson I didn't try myself, but I was under the impression that it should work for F# based on https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/caller-information |
Perhaps some of the documentation I was relying on is out of date, but it seemed to suggest that caller information was only available in C# and VB. |
@Youssef1313 Seems to be working fine for F#. @peterwald I'm going to close this PR and just push all v3 over to Fact-attribute based discovery. v1 and v2 projects will still use Cecil when appropriate. Since your Cecil-based issues are with v3, they should be solved by the compile-time source information discovery. |
Taking a different approach to solve the issue |
Creates a separate MetadataReader for the PDB. This should handle both embedded and non-embedded portable PDBs. Note that it does not support the legacy Windows PDB format.
Any reads of the debug data should use the MetadataReaderProvider created from the PDBs, while the other metadata should be read using the PE MetadataReader.
#3304