Move hardcoded warning strings in MergeRemapXml to Properties.Resources with XA codes#11446
Open
Copilot wants to merge 2 commits into
Open
Move hardcoded warning strings in MergeRemapXml to Properties.Resources with XA codes#11446Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
7 tasks
…g using XA4316-XA4318 resource strings Agent-Logs-Url: https://github.com/dotnet/android/sessions/7e03d751-10ad-43ae-aaf3-4eed96128ac4 Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix hardcoded warning strings in MergeRemapXml
Move hardcoded warning strings in MergeRemapXml to Properties.Resources with XA codes
May 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes MergeRemapXml warnings by converting previously hardcoded Log.LogWarning() messages into coded warnings backed by Properties.Resources entries (XA4316–XA4318), and documents the new warning codes in the docs message catalog.
Changes:
- Replaced three hardcoded warning strings in
MergeRemapXml.cswithLog.LogCodedWarning()calls using new XA4316–XA4318 resource strings. - Added XA4316–XA4318 to
Resources.resx(and updated the generatedResources.Designer.cs). - Added new warning documentation pages and linked them from the messages index.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Xamarin.Android.Build.Tasks/Tasks/MergeRemapXml.cs | Switch warning logging to XA-coded warnings backed by localized resources. |
| src/Xamarin.Android.Build.Tasks/Properties/Resources.resx | Add XA4316–XA4318 warning strings and parameter comments. |
| src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs | Generated accessors for the new XA4316–XA4318 resource strings. |
| Documentation/docs-mobile/messages/xa4316.md | New documentation page for warning XA4316. |
| Documentation/docs-mobile/messages/xa4317.md | New documentation page for warning XA4317. |
| Documentation/docs-mobile/messages/xa4318.md | New documentation page for warning XA4318. |
| Documentation/docs-mobile/messages/index.md | Add XA4316–XA4318 to the messages index. |
Files not reviewed (1)
- src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs: Language not supported
| @@ -836,6 +836,22 @@ Remove the '{0}' reference from your project and add the '{1}' NuGet package ins | |||
| <data name="XA4315" xml:space="preserve"> | |||
| <value>Ignoring `{0}`. Manifest does not have the required 'package' attribute on the manifest element.</value> | |||
| <comment>{0} - The path the the file. | |||
| + [XA4314](xa4314.md): `$(Property)` is empty. A value for `$(Property)` should be provided. | ||
| + [XA4315](xa4315.md): Ignoring {file}. Manifest does not have the required 'package' attribute on the manifest element. | ||
| + [XA4316](xa4316.md): Specified input file '{file}' does not exist. Ignoring. | ||
| + [XA4317](xa4317.md): Input file '{file}' does not start with '\<replacements/\>'. Skipping. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Three
Log.LogWarning()calls inMergeRemapXml.csused hardcoded interpolated strings instead of coded warnings fromProperties.Resources, making them inconsistent with the rest of the build tasks and harder to discover in documentation.Changes
MergeRemapXml.cs— ReplaceLog.LogWarningwithLog.LogCodedWarningusing resource strings:Resources.resx/Resources.Designer.cs— AddXA4316,XA4317,XA4318entriesDocumentation/docs-mobile/messages/— Addxa4316.md,xa4317.md,xa4318.mdindex.md— Add new codes to the warning table of contentsNew warning codes