Repository navigation
GetDisplayName uses 'ref Type' instead of 'Type&' - #2461
jtschuster wants to merge 1 commit into
Conversation
tlakollo
left a comment
There was a problem hiding this comment.
Looks good to me, but we will need to follow up with this change in case merged to see nothing breaks in the SDK and runtime. Maybe someone suppresses something and now it will start failing
30cb27d to
e0de6b9
Compare
|
What is the motivation for this change? |
@marek-safar The original issue was filed in response to this discussion. I think in general we're trying to have our notation match C# warning notation. |
I'm not a big fan of doing this. This change makes the warning confusing for a C# developer if they actually had VB and F# devs will have no clue what |
That's a really good point, if the linker deals with IL that could be from any .NET language, should we ever be using C# notation in linker diagnostics? And if we should use IL notation, do we want C# analyzers producing slightly different diagnostics that are C# specific and more understandable? I've been getting the impression we want the linker and the analyzers to produce identical diagnostics and use C#/Roslyn notation, but maybe we should rethink that. |
I agree with Michal, ILLinker operates at IL/metadata level and the closest match to that is reflection. I think all error messages that come from illinker (not analyzers) should use reflection notation (or something very close to it). We could explore the option of customizing the output based on the compiler used to produce the assembly but I'm really not sure it's worth it and it still has shortcomings because there are many different compilers (e.g. iron python). Another option would be the explicit |
|
@jtschuster thanks for kicking off a good discussion with this change. I made #2406 a tracking issue for changing the linker warnings to use reflection notation. |
Modifies the behavior of GetDisplayName in the Linker to use the 'ref Type' format instead of the 'Type&' that is default in Cecil. Fixes #2406