Uh oh!
There was an error while loading. Please reload this page.
[release/6.0.x] Add System.Diagnostics.StackFrame.GetMethodInfoFromNativeIP API for VS4Mac - #61298
Conversation
…S4Mac VS4Mac needs a way to symbolize managed IPs when rethrowing a native NSException from Objective C++. This is a short term API needed for the next 6.0 service release discoverable only through reflection. Issue: dotnet#61186
ghost
commented
Nov 7, 2021
Tagging subscribers to this area: @tommcdon Issue DetailsCustomer ImpactVS4Mac needs a way to symbolize managed IPs when rethrowing a native NSException from Objective C++. This is a short term API needed for the next 6.0 service release discoverable only through reflection. Issue: #61186 TestingLocal testing. Verified by the VS4Mac team. RiskLow.
|
Uh oh!
There was an error while loading. Please reload this page.
VS4Mac uses reflection to get to and call it and if it isn't in the linker file it gets removed. |
MichalStrehovsky
commented
Nov 9, 2021
I assume this happens during the repo build because the API is not public. ILLink.Descriptors.Shared.xml are used both at repo build time and end user app build time. We don't want to root an unused API in all .NET apps just because VS4Mac uses it. This directive should go in the LibraryBuild.xml file like here: LibraryBuild directives are only used when building the repo. They will not root things when building/trimming end user apps. Cc @eerhardt |
eerhardt
commented
Nov 9, 2021
Can we instead propose a public API for this? That is MUCH better than using private reflection. |
mikem8361
commented
Nov 9, 2021
I thought adding a new public API to a service release wasn't possible and this is temporary until we have time to design a public one. This needs to go into 6.0.1. Or are you saying that if I make it public I won't need the ILLink.Descriptors.Shared.xml entry to keep it from being elided? |
mikem8361
commented
Nov 9, 2021
@noahfalk can you approve this 6.0 PR also? I'll make the same changes as the 7.0 one you reviewed. |
eerhardt
commented
Nov 9, 2021
I didn't notice initially that this is targeting
I guess making it And also adding a comment to the entry stating why it is there. See https://github.com/dotnet/runtime/blob/main/docs/workflow/trimming/ILLink-files.md#illinkdescriptorsxml for more information on how to use these ILLink files. |
jkotas
commented
Nov 9, 2021
Yes, you can make it public in CoreLib, without adding it to the reference assembly. You won't need to mess with the linker directives if you do it that way. Instead, you will need to suppress warning that complains about the implementation and reference assembly being out of sync. |
eerhardt
left a comment
There was a problem hiding this comment.
Does it make sense / is it possible to add tests?
Uh oh!
There was an error while loading. Please reload this page.
jeffschwMSFT
left a comment
There was a problem hiding this comment.
Approved. We should take this for consideration in 6.0.x
There is no easy way to test this API. I have something that only works on Linux using the native libunwind library to get IPs to check but it won't work on OSX (libunwind isn't discoverable and the simple unwind function doesn't exist) and Windows. And there is time constraints getting this into 6.0.x and upcoming vacations. |
jkotas
commented
Nov 9, 2021
Also, the eventual public API is going to have tests. We have discussed strategies to implement the tests. |
eerhardt
left a comment
There was a problem hiding this comment.
ILLink changes look good to me.
Anipik
commented
Nov 9, 2021
@mikem8361 is this ready to merge or do we need any review here ? |
jeffschwMSFT
commented
Nov 9, 2021
mikem8361
commented
Nov 9, 2021
Jan: The API that we want to make public should have different shape (it should be StackFrame factory). It requires refactoring that would not appropriate for servicing, and that would not be possible to pull off in the few days that this have to be done in. |
jeffschwMSFT
commented
Nov 9, 2021
@mikem8361 have we looked at the failing CI? With that @Anipik we are ready to merge. |
mikem8361
commented
Nov 9, 2021
via email
The failing CI all look like timeouts/existing infrastructure problems. I'm still waiting for some feedback from Kyle before we merge it. |
mikem8361
commented
Nov 9, 2021
We are ready to merge. |
Customer Impact
VS4Mac needs a way to symbolize managed IPs when rethrowing a native NSException from Objective C++. This is a short term API needed for the next 6.0 service release discoverable only through reflection.
Issue: #61186
Testing
Local testing. Verified by the VS4Mac team.
Risk
Low.