Address build log warnings#11625
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce local build-log warnings by cleaning up XML documentation issues, removing unused usings, and adding targeted warning suppressions across installer, runtime, and test infrastructure code.
Changes:
- Suppress or resolve documentation-related warnings (e.g., CS1591) and improve XML doc completeness/accuracy.
- Add targeted analyzer suppressions / nullability tweaks in runtime + test utilities.
- Remove unused usings / tighten some nullable flows.
Show a summary per file
| File | Description |
|---|---|
| src/Xamarin.Installer.Common/Xamarin.Installer.Common.csproj | Adds CS1591 suppression to reduce doc-warning noise. |
| src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK/Repository.cs | Removes incorrect/obsolete XML doc parameter tag. |
| src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK/JavaDependencyInstaller.cs | Adjusts temp-file creation to address compiler warning. |
| src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK/IProgressMonitor.cs | Completes XML docs for progress-reporting parameters. |
| src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK/DirectorySizeMonitoringTimer.cs | Fixes XML doc parameter name/description. |
| src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK/Common/HttpClientProvider.cs | Adds missing XML docs for optional parameters. |
| src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK/Common/Archive.cs | Adjusts XML documentation text to avoid doc warnings. |
| src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK/Common/AndroidLicensesStorage.cs | Adds missing XML doc for a boolean parameter. |
| src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK/AndroidSDKInstaller.cs | Fixes/extends XML docs (param tags, formatting). |
| src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK.csproj | Adds CS1591 suppression to reduce doc-warning noise. |
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/SolutionBuilder.cs | Adds nullability annotation to help static analysis. |
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/AndroidSdkResolver.cs | Suppresses CA1416 around Windows registry usage in tests. |
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/InlineData.cs | Removes unused using. |
| src/Mono.Android/Mono.Android.csproj | Removes a compile item from Mono.Android build inputs. |
| src/Mono.Android/Java.Interop/TypeManager.cs | Tightens nullable flow around typemap resolution. |
| src/Mono.Android/Android.Runtime/RuntimeNativeMethods.cs | Updates P/Invoke signature nullability for typemap lookup. |
| src/Mono.Android/Android.Runtime/JNIEnv.cs | Qualifies RuntimeFeature usage and adjusts nullable return types. |
| src/Mono.Android/Android.Runtime/AndroidRuntime.cs | Removes unused usings; qualifies RuntimeHelpers usage. |
| build-tools/jnienv-gen/Generator.cs | Suppresses an “unassigned field” warning in generator model types. |
Copilot's findings
- Files reviewed: 19/19 changed files
- Comments generated: 4
| static Type? GetJavaToManagedTypeCore (string? class_name) | ||
| { | ||
| if (TypeManagerMapDictionaries.JniToManaged.TryGetValue (class_name, out Type? type)) { | ||
| if (class_name is not null && TypeManagerMapDictionaries.JniToManaged.TryGetValue (class_name, out Type? type)) { | ||
| return type; | ||
| } |
| <Compile Include="Microsoft.Android.Runtime\ManagedTypeManager.cs" /> | ||
| <Compile Include="Microsoft.Android.Runtime\ManagedTypeMapping.cs" /> | ||
| <Compile Include="Microsoft.Android.Runtime\JavaMarshalValueManager.cs" /> | ||
| <Compile Include="Microsoft.Android.Runtime\RuntimeFeature.cs" /> | ||
| <Compile Include="Microsoft.Android.Runtime\SimpleValueManager.cs" /> | ||
| <Compile Include="Microsoft.Android.Runtime\SingleUniverseTypeMap.cs" /> |
There was a problem hiding this comment.
@copilot we need to figure out how to remove it AND make sure it's accessible everywhere where it's needed (via InternalsVisibleTo I imagine). This way we don't have the same class in both Mono.Android and Mono.Android.Runtime. Only the Mono.Android.Runtime should be used everywhere.
There was a problem hiding this comment.
Done in the latest commit. RuntimeFeature.cs is now removed from Mono.Android.csproj — Mono.Android.Runtime already had [assembly: InternalsVisibleTo("Mono.Android, ...")] in its AssemblyInfo.cs.in, so AndroidRuntimeFeature (internal) remains accessible from Mono.Android via that existing declaration.
|
@copilot address code review |
Co-authored-by: simonrozsival <374616+simonrozsival@users.noreply.github.com>
Addressed all four review points in commit
|
|
@copilot let's rename |
Co-authored-by: simonrozsival <374616+simonrozsival@users.noreply.github.com>
Done in commit |
Co-authored-by: simonrozsival <374616+simonrozsival@users.noreply.github.com>
…lsVisibleTo from Mono.Android.Runtime Co-authored-by: simonrozsival <374616+simonrozsival@users.noreply.github.com>
This separates warning cleanups from the Java.Interop work branch so they can be reviewed independently.\n\nThe changes address warnings surfaced in local build logs across runtime, installer, and test infrastructure code.