Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Remove internal and orphaned error messages from localizable .resx resources

Abierto
#13,196 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
csharp, xml

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
C#
Estrellas
2.1k
Forks
579
Merge medio
1 d 13 h
PR fusionados (30 d)
238

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de dotnet/android

Todos los issues de dotnet/android

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.