-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Resolve remaining Xslt-related warnings (round 2) #50211
Conversation
Tagging subscribers to this area: @buyaa-n, @krwq Issue DetailsAddressing the remaining warnings in System.Private.Xml related to xslt. I have one more batch of changes to be pushed to this which are almost ready and will deal with one more warning left. I'll add a comment here when this is ready for review. Contributes to #45623
|
Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @tannergooding, @sbomer Issue DetailsAddressing the remaining warnings in System.Private.Xml related to xslt. I have one more batch of changes to be pushed to this which are almost ready and will deal with one more warning left. I'll add a comment here when this is ready for review. Contributes to #45623
|
src/libraries/System.Private.Xml/src/System/Xml/Xslt/XsltArgumentList.cs
Outdated
Show resolved
Hide resolved
PR is now ready for review 😃 |
src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/CompiledXPathExpr.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlQueryContext.cs
Show resolved
Hide resolved
@@ -2817,6 +2817,7 @@ public partial class XsltArgumentList | |||
{ | |||
public XsltArgumentList() { } | |||
public event System.Xml.Xsl.XsltMessageEncounteredEventHandler XsltMessageEncountered { add { } remove { } } | |||
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The stylesheet may have calls to methods of the extension object passed in which cannot be statically analyzed by the trimmer. Ensure all methods that may be called are kept.")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The stylesheet may have calls to methods of the extension object passed in which cannot be statically analyzed by the trimmer. Ensure all methods that may be called are kept.")] | |
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The stylesheet may have calls to methods of the extension object passed in which cannot be statically analyzed by the trimmer. Ensure all methods that may be called are preserved.")] |
I've been using the term preserved
elsewhere. It would be good to be consistent throughout the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this was resolved in the latest code. Both here and below.
src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/GenerateHelper.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlExtensionFunction.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XsltLibrary.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/XsltCompileContext.cs
Outdated
Show resolved
Hide resolved
…rateHelper.cs Co-authored-by: Eric Erhardt <[email protected]>
…lExtensionFunction.cs Co-authored-by: Eric Erhardt <[email protected]>
@vitek-karas @eerhardt thanks a lot for your feedback! PR is ready in case you want to take another look. |
src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XsltLibrary.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XslAstAnalyzer.cs
Outdated
Show resolved
Hide resolved
@@ -1054,6 +1054,9 @@ public XslFlags Variable(string prefix, string name) | |||
return XslFlags.None; | |||
} | |||
|
|||
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", | |||
Justification = "Supressing warning about not having the RequiresUnreferencedCode attribute since xsl Scripts are " + | |||
"not supported in .NET Core")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is the dead code that can be removed? Can we add a link to the issue tracking removing it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#50308 done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Thanks @joperezr. I just had a few nits here and there.
Addressing the remaining warnings in System.Private.Xml related to xslt. I have one more batch of changes to be pushed to this which are almost ready and will deal with one more warning left. I'll add a comment here when this is ready for review.
Contributes to #45623