Remove internal and orphaned error messages from localizable .resx resources
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- csharp, xml
- Lĩnh vực
- build-system, internationalization, tooling
Hướng nghiên cứu
Start by reading the referenced discussion in PR #13093, then trace the listed resource keys to their uses in the named task files and .targets file. Check each proposed removal against those call sites and remove orphaned entries from the specified .resx files. For mixed-use XA4234, preserve the user-facing MavenDownload diagnostic while handling internal invariant checks separately; done means the internal messages and unused entries are removed without losing user-facing diagnostics.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context: https://github.com/dotnet/android/pull/13093#discussion_r4314525729
Several error and warning messages stored in localizable .resx files are actually internal invariant/wiring checks — if they ever trigger, it indicates a bug in our MSBuild .targets, tasks, or SDK build outputs rather than something a user caused or can fix. Translating these adds unnecessary localization maintenance and can make internal bug reports harder to search and diagnose.
We should remove strictly internal error messages from localizable .resx resources (replacing them with non-localized exceptions or internal error messages) and clean up orphaned resource entries.
1. Strictly Internal Errors in src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
| Resource Key(s) | Where Used | Why It's an Internal Error |
|---|---|---|
XA0116 |
CopyResource.cs |
Calls Assembly.GetExecutingAssembly().GetManifestResourceStream(ResourceName) to extract resources embedded inside Xamarin.Android.Build.Tasks.dll (MonoRuntimeProvider.Bundled.java, NativeAotRuntimeProvider.java, net.android.init.gradle.kts). Note that R8.cs already throws InvalidOperationException for missing embedded resources. |
XA4219 |
GenerateLayoutBindings.cs |
Has a // Should "never" happen comment in the code. Unknown OutputLanguage values already fall back to DefaultOutputGenerator.Creator() (() => new CSharpBindingGenerator()), which is non-null. |
XA4223, XA4224, XA4226 |
GenerateLayoutBindings.cs |
Validates metadata (LayoutGroup, WidgetCollectionKey, ClassName, etc.) on @(_LayoutForBinding) and @(_LayoutPartialClass) items created immediately beforehand by CalculateLayoutCodeBehind with hardcoded BaseNamespace="Binding". |
XA4240 |
Xamarin.Android.Common.targets |
Validates the internal underscore-prefixed $(_AndroidJcwCodegenTarget) property (unlike XA4232, which validates the public $(AndroidCodegenTarget)). |
XA4254, XA4255 |
GenerateTrimmableTypeMap.cs |
XA4254 checks that JavaSourceInputDirectory (obj/.../typemap/java) and JavaSourceOutputDirectory (obj/.../typemap/linked-java) differ — both are internal paths wired by .targets. XA4255 fires if a .java file expected from the pre-trim pass is missing in the post-trim pass. |
XA4305 |
R8.cs |
Warns that $(_AndroidMainDexListFile) (MultiDexMainDexListFile) is empty when multidex is enabled; this is an internal property set to $(IntermediateOutputPath)multidex.keep. |
XA4325 + all 14 XA4325_* sub-keys (_MappingNotFound, _MappingDataFailure, _AssemblyReadFailure, _AssemblyNotFound, _AssemblyHasNoMetadata, _AmbiguousEntry, _NativeAotObjectRequired, _NativeAotObjectReadFailure, _NativeAotModeRequired, _NativeAotObjectFormat, _NativeAotInvalidSection, _NativeAotTruncatedSection, _NativeAotMissingSections, _NativeAotInvalidDehydration) |
GenerateR8JniRemapping.cs, GenerateJniRemappingBinaryBlobs.cs, GenerateNativeAotDataObject.cs, NativeAotJniRetention.cs |
All validate internal task parameters (NativeAotObjectFile requires NativeAot=true), intermediate build outputs (r8-jni-mapping.txt, linked assemblies, post-ILC .o files), or internal ELF/NativeAOT dehydration invariants. (GenerateJniRemappingBinaryBlobs and GenerateNativeAotDataObject already pass unlocalized ex.Message into XA4325). |
XA4327 |
ExtractTypeMapKeysFromAssemblies.cs, ExtractTypeMapKeysFromNativeAotObject.cs |
{1} already receives unlocalized internal exception strings ("No linked assemblies were supplied.", "An existing full path to llvm-readobj is required.", "The NativeAOT common-fixup table was not found."). Only triggers if our .targets pass bad inputs or our own TypeMapAttribute/ILC object format is out of sync with the parser. |
XA4328, XA4328_NoInputs, XA4328_InvalidName |
GenerateTypeMapProguardConfiguration.cs |
Reads $(IntermediateOutputPath)typemap.keys.txt produced immediately before by _AndroidExtractTypeMapKeys. Missing input files or invalid lines in typemap.keys.txt indicate a bug in _AndroidExtractTypeMapKeys or .targets. |
XA5303, XA5304 |
CompressAssemblies.cs |
XA5303 fails to parse DescriptorIndex metadata as uint, which CollectAssemblyFilesToCompress just formatted from uint.ToString(InvariantCulture). XA5304 validates CompressionLevel, which comes from internal $(_AndroidAssemblyStoreCompressionLevel). |
XAGCA7009_UnsupportedRuntime |
GenerateNativeApplicationConfigSources.cs (#13093) |
Validates that GenerateNativeApplicationConfigSources is only invoked for the CoreCLR runtime. |
2. Internal Errors in Other Resources.resx Files
Required_Downloadable_Mismatch(src/Xamarin.Installer.Build.Tasks/Properties/Resources.resx):- Literally reads: "Internal error: expected to install {0} components, but no downloads were available."
XA0135_RunAsPackageNotAndApplication(src/Xamarin.Android.Build.Debugging.Tasks/Properties/Resources.resx):- States: "The Fast Deployment system should have handled this particular error automatically and used a backup installation path. However if you are seeing this error please file an issue..."
3. Mixed Usage (User-Facing Code Reused for Internal Invariants)
XA4234('<{0}>' item '{1}' is missing required attribute '{2}'.viaTryGetRequiredMetadata):- User-facing in
MavenDownload.cs(<AndroidMavenLibrary>missingVersion). - Also used for internal item metadata checks in
CompressAssemblies.cs(AssembliesToCompressmissingDestinationPath/DescriptorIndex),WrapAssemblyStoresAsSharedLibraries.cs(ResolvedAssembliesmissingAbi), andBuildArchive.cs(FilesToAddToArchivemissingArchivePath).
- User-facing in
4. Orphaned / Unused Entries in src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
These keys have no remaining references in product code (several were internal errors from removed tasks/pipelines):
- Internal/legacy typemap, marshal-methods & JCW codes:
XA4217,XA4227,XA4253,XA4264,XA4305_File_Missing,XA4308,XA4324 - Other unused codes:
XA0105,XA0107_Ignoring,XA0118_Parse,XA0118_Target,XA0119_AAB,XA0122,XA0125,XA0139,XA1015,XA1016,XA1017,XA1019,XA2002_Framework,XA2002_NuGet,XA2006,XA2007,XA2008,XA2024,XA4209,XA4214,XA4214_Result,XA4231,XA4243,XA4300,XA4307,XA4311,XA5211,XA5300_Android_Platforms,XA5301
- Ngôn ngữ chính
- C#
- Star
- 2.1k
- Fork
- 581
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 249
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dotnet/android
-
Area: App+Library Build
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
EditText.getText() isn't boundĐang mởArea: Mono.Android
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
dotnet/android#9192 · 4 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agentic-workflows needs-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Automatically include NativeAOT debug symbols in Android App Bundles for Google PlayCó thể đã có người làm @simonrozsival đã nhận 1 ngày trước. Đang mởArea: App+Library Build needs-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
-
.NET11 RC2 AndroidTypeMapImplementation trimmable doesn't generate java callable wrappers for classes marked with Register attributeCó thể đã có người làm @simonrozsival đã nhận 1 ngày trước. Đang mởneeds-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 46/100
dotnet/android#13205 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của dotnet/android
Issue tương tự
-
/api/oauth/introspect emits clientId and tokenType instead of RFC 7662's client_id and token_typeĐang mởbug P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nightscout/nocturne#2317 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: Position intent set on a simple order is dropped when it becomes a bracket, OCO or OTO orderCó thể đã có người làm @RaphaelFakhri đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
alpacahq/alpaca-trade-api-csharp#903 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
joinrpg/joinrpg-net#5752 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
CodeForFire/lagebuch#714 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
dimitar-radenkov/Pointframe#294 ·
Maintainer thường phản hồi trong vòng 1 ngày