Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR simplifies and unifies the XAML XML namespace definitions across multiple target platforms by updating the XmlnsDefinitionAttribute constructor signature and adding support for implicit XMLNS declarations. Key changes include:
- Changing constructor parameters for XmlnsDefinitionAttribute from (string xmlNamespace, string clrNamespace) to (string xmlNamespace, string target) across PublicAPI files.
- Introducing a new AllowImplicitXmlnsDeclarationAttribute and updating related XAML parsing tasks.
- Adjustments to error messages and XML namespace management in build tasks.
Reviewed Changes
Copilot reviewed 39 out of 43 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Shipped.txt | Updated XmlnsDefinitionAttribute signature. |
| src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt | Added AllowImplicitXmlnsDeclarationAttribute and related members. |
| src/Controls/src/Core/PublicAPI/net-windows/*.txt | Updated public API definitions to reflect the new signature and attribute. |
| src/Controls/src/Core/PublicAPI/net-tizen/*.txt | Updated public API definitions uniformly for Tizen. |
| src/Controls/src/Core/PublicAPI/net-maccatalyst/*.txt | Updated public API definitions uniformly for MacCatalyst. |
| src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt | Updated iOS public API definitions. |
| src/Controls/src/Core/PublicAPI/net-android/*.txt | Updated Android public API definitions. |
| src/Controls/src/Core/Properties/AssemblyInfo.cs | Added a new XmlnsPrefix for xaml. |
| src/Controls/src/Core/AllowImplicitXmlnsDeclarationAttribute.cs | Introduced new attribute for implicit XMLNS declarations. |
| src/Controls/src/Build.Tasks/XmlTypeExtensions.cs | Adjusted XML namespace handling and error messaging. |
| src/Controls/src/Build.Tasks/XamlTask.cs and XamlCTask.cs | Updated parsing logic to work with the new implicit XMLNS functionality. |
Files not reviewed (4)
- Microsoft.Maui-vscode.sln: Language not supported
- src/Controls/docs/Microsoft.Maui.Controls/XmlnsDefinitionAttribute.xml: Language not supported
- src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Shipped.txt: Language not supported
- src/Controls/src/Core/PublicAPI/net/PublicAPI.Shipped.txt: Language not supported
Comments suppressed due to low confidence (1)
src/Controls/src/Build.Tasks/XmlTypeExtensions.cs:51
- The error message contains a duplicated phrase ('Can't add assembly') which may confuse users. Consider removing the duplicate to clarify the message.
throw new BuildException(BuildExceptionCode.InvalidXaml, null, null, $"Protected Xmlns {attribute.XmlNamespace}. Can't add assembly Can't add assembly {attribute.Target}/{attribute.AssemblyName}.");
a806d2a to
acd2a94
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this is a merge of #28909, #28969, #29203 and #29181
it's probably easier to review independent PRs, but merging them is a nightmare