Move GlobExpansionFailed resource from Build to Shared#12335
Move GlobExpansionFailed resource from Build to Shared#12335JanProvaznik merged 3 commits intodotnet:mainfrom
Conversation
This reverts commit 46bf456.
There was a problem hiding this comment.
Pull Request Overview
This PR moves the GlobExpansionFailed resource string from the Microsoft.Build assembly to the Shared resources to fix accessibility issues across multiple assemblies. The resource was previously only available in Microsoft.Build but was needed in Microsoft.Build.Tasks.Core and Microsoft.Build.Utilities.Core assemblies.
- Moved
GlobExpansionFailedstring resource from Build to Shared resources - Updated code reference to use the new
Shared.GlobExpansionFailedresource key - Removed old resource entries from all Build localization files
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Shared/FileMatcher.cs | Updated resource string key from GlobExpansionFailed to Shared.GlobExpansionFailed |
| src/Shared/Resources/Strings.shared.resx | Added the new shared resource string definition |
| src/Shared/Resources/xlf/*.xlf | Added translated versions of the resource string across all supported languages |
| src/Build/Resources/Strings.resx | Removed the old resource string definition |
| src/Build/Resources/xlf/*.xlf | Removed translated versions from all Build localization files |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
|
/backport to 17.14 |
|
Started backporting to 17.14: https://github.com/dotnet/msbuild/actions/runs/16991864438 |
|
@JanProvaznik an error occurred while backporting to "17.14", please check the run log for details! Error: The specified backport target branch "17.14" wasn't found in the repo. |
|
/backport to vs17.14 |
|
Started backporting to vs17.14: https://github.com/dotnet/msbuild/actions/runs/16991880140 |
|
@JanProvaznik backporting to "vs17.14" failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: move
Using index info to reconstruct a base tree...
M src/Build/Resources/Strings.resx
M src/Build/Resources/xlf/Strings.cs.xlf
M src/Build/Resources/xlf/Strings.de.xlf
M src/Build/Resources/xlf/Strings.es.xlf
M src/Build/Resources/xlf/Strings.fr.xlf
M src/Build/Resources/xlf/Strings.it.xlf
M src/Build/Resources/xlf/Strings.ja.xlf
M src/Build/Resources/xlf/Strings.ko.xlf
M src/Build/Resources/xlf/Strings.pl.xlf
M src/Build/Resources/xlf/Strings.pt-BR.xlf
M src/Build/Resources/xlf/Strings.ru.xlf
M src/Build/Resources/xlf/Strings.tr.xlf
M src/Build/Resources/xlf/Strings.zh-Hans.xlf
M src/Build/Resources/xlf/Strings.zh-Hant.xlf
M src/Shared/Resources/xlf/Strings.shared.cs.xlf
M src/Shared/Resources/xlf/Strings.shared.de.xlf
M src/Shared/Resources/xlf/Strings.shared.es.xlf
M src/Shared/Resources/xlf/Strings.shared.fr.xlf
M src/Shared/Resources/xlf/Strings.shared.it.xlf
M src/Shared/Resources/xlf/Strings.shared.ja.xlf
M src/Shared/Resources/xlf/Strings.shared.ko.xlf
M src/Shared/Resources/xlf/Strings.shared.pl.xlf
M src/Shared/Resources/xlf/Strings.shared.pt-BR.xlf
M src/Shared/Resources/xlf/Strings.shared.ru.xlf
M src/Shared/Resources/xlf/Strings.shared.tr.xlf
M src/Shared/Resources/xlf/Strings.shared.zh-Hans.xlf
M src/Shared/Resources/xlf/Strings.shared.zh-Hant.xlf
Falling back to patching base and 3-way merge...
Auto-merging src/Build/Resources/Strings.resx
Auto-merging src/Build/Resources/xlf/Strings.cs.xlf
CONFLICT (content): Merge conflict in src/Build/Resources/xlf/Strings.cs.xlf
Auto-merging src/Build/Resources/xlf/Strings.de.xlf
CONFLICT (content): Merge conflict in src/Build/Resources/xlf/Strings.de.xlf
Auto-merging src/Build/Resources/xlf/Strings.es.xlf
CONFLICT (content): Merge conflict in src/Build/Resources/xlf/Strings.es.xlf
Auto-merging src/Build/Resources/xlf/Strings.fr.xlf
CONFLICT (content): Merge conflict in src/Build/Resources/xlf/Strings.fr.xlf
Auto-merging src/Build/Resources/xlf/Strings.it.xlf
Auto-merging src/Build/Resources/xlf/Strings.ja.xlf
CONFLICT (content): Merge conflict in src/Build/Resources/xlf/Strings.ja.xlf
Auto-merging src/Build/Resources/xlf/Strings.ko.xlf
CONFLICT (content): Merge conflict in src/Build/Resources/xlf/Strings.ko.xlf
Auto-merging src/Build/Resources/xlf/Strings.pl.xlf
CONFLICT (content): Merge conflict in src/Build/Resources/xlf/Strings.pl.xlf
Auto-merging src/Build/Resources/xlf/Strings.pt-BR.xlf
CONFLICT (content): Merge conflict in src/Build/Resources/xlf/Strings.pt-BR.xlf
Auto-merging src/Build/Resources/xlf/Strings.ru.xlf
CONFLICT (content): Merge conflict in src/Build/Resources/xlf/Strings.ru.xlf
Auto-merging src/Build/Resources/xlf/Strings.tr.xlf
CONFLICT (content): Merge conflict in src/Build/Resources/xlf/Strings.tr.xlf
Auto-merging src/Build/Resources/xlf/Strings.zh-Hans.xlf
CONFLICT (content): Merge conflict in src/Build/Resources/xlf/Strings.zh-Hans.xlf
Auto-merging src/Build/Resources/xlf/Strings.zh-Hant.xlf
CONFLICT (content): Merge conflict in src/Build/Resources/xlf/Strings.zh-Hant.xlf
Auto-merging src/Shared/Resources/xlf/Strings.shared.cs.xlf
Auto-merging src/Shared/Resources/xlf/Strings.shared.de.xlf
Auto-merging src/Shared/Resources/xlf/Strings.shared.es.xlf
Auto-merging src/Shared/Resources/xlf/Strings.shared.fr.xlf
Auto-merging src/Shared/Resources/xlf/Strings.shared.it.xlf
Auto-merging src/Shared/Resources/xlf/Strings.shared.ja.xlf
Auto-merging src/Shared/Resources/xlf/Strings.shared.ko.xlf
Auto-merging src/Shared/Resources/xlf/Strings.shared.pl.xlf
Auto-merging src/Shared/Resources/xlf/Strings.shared.pt-BR.xlf
Auto-merging src/Shared/Resources/xlf/Strings.shared.ru.xlf
Auto-merging src/Shared/Resources/xlf/Strings.shared.tr.xlf
Auto-merging src/Shared/Resources/xlf/Strings.shared.zh-Hans.xlf
Auto-merging src/Shared/Resources/xlf/Strings.shared.zh-Hant.xlf
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 move
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
Fixes #12334
Context
#11211 introduced logging the exception when globbing fails to improve debuggability.
This leads to error that some codepaths can't find a string resource because the resource is only in the assembly Microsoft.Build, but the code using it is in multiple assemblies (Microsoft.Build, Microsoft.Build.Tasks.Core, Microsoft.Build.Utiliities.Core)
Changes Made
Move the resource string from Microsoft.Build's resources to Shared resources.
Testing
manual validation:
created a test build using the resource in code in Microsoft.Build.dll and in Microsoft.Build.Tasks.Core.dll at the place where the issue was reported.
I didn't find a way to make a unit test for it because the behavior leading to this log message is not reliably reproducible, and test for "grab this one resource and check for no exception", does not seem interesting.
Notes
A general nonbehavioral test that all resources are available for dlls that reference them would be nice to have to prevent this class of issues.