Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Remove internal and orphaned error messages from localizable .resx resources

オープン
#13,196 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp, xml

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

needs-triage

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}'. via TryGetRequiredMetadata):
    • User-facing in MavenDownload.cs (<AndroidMavenLibrary> missing Version).
    • Also used for internal item metadata checks in CompressAssemblies.cs (AssembliesToCompress missing DestinationPath/DescriptorIndex), WrapAssemblyStoresAsSharedLibraries.cs (ResolvedAssemblies missing Abi), and BuildArchive.cs (FilesToAddToArchive missing ArchivePath).

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
主要言語
C#
スター
2.1k
フォーク
579
平均マージ
1日 13時間
マージ済み PR(30日)
244

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotnet/android のほかの issue

dotnet/android の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。