[cleanup] Delete unused public types from inlined platform-support projects#11612
Open
jonathanpeppers wants to merge 4 commits into
Open
[cleanup] Delete unused public types from inlined platform-support projects#11612jonathanpeppers wants to merge 4 commits into
jonathanpeppers wants to merge 4 commits into
Conversation
…Tools Continues #11607 by deleting public types that have zero callers in the repo and aren't transitively reachable from the live external surface consumed by Xamarin.Android.Build.Debugging.Tasks and Xamarin.Installer.Build.Tasks. Mono.AndroidTools deletions: - Adb/DeviceConnection.cs (DeviceConnection) - Internal/AdbStartServerProcess.cs (IAdbStartServerProcess, AdbStartServerProcess) - Internal/AdbStartWindowsServerProcess.cs (AdbStartWindowsServerProcess) - Util/Win32Interop.cs (Win32Interop, ProcessInfo, SecurityAttributes, StartupInfo, StartF, HandleFlags, CreateProcessFlags, SafeProcessHandle, ProcessWaitHandle) Xamarin.AndroidTools deletions: - Sdks/RegistryEx.cs (entire file - internal class with zero callers) - OS.cs: nested internal RegistryEx class and Wow64 enum (no callers) - AndroidVersion.cs: AndroidVersionExtensions.ToLegacyVersion (no callers) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…arin.AndroidTools - Delete Utils.cs (Xamarin.AndroidTools): all members unused by consumers. - Delete CustomVSAndroidLicensesStorage.cs: unused. - Delete SystemImageSpec.cs: unused. - Delete IAndroidArchive.cs and IAndroidComponentDescriptor.cs: only referenced by each other, no implementers. All five downstream csprojs build cleanly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Delete AmIntentCommandParser.cs and the matching ExecutionConfiguration(string, string) constructor: only consumer (RunActivity.cs) calls the (string, AmIntentCommand) overload. - Remove IProgressMonitorFactory interface from IProgressMonitor.cs: no callers anywhere in the repo. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR continues the android-platform-support inlining cleanup by removing unused public (and related internal) types from the inlined platform-support projects that ship via MicrosoftAndroidSdkOutDir, reducing dead surface area while keeping the in-repo consumers building.
Changes:
- Removed legacy/unused ADB start-server helpers, Win32 interop types, and a direct-to-daemon
DeviceConnectionimplementation fromMono.AndroidTools. - Removed unused debugging helpers (intent parser +
ExecutionConfigurationstring overload), obsolete utility shims, and Windows registry helpers fromXamarin.AndroidTools. - Removed unused installer/SDK-manager model and helper interfaces/types from
Xamarin.Installer.AndroidSDK(includingSystemImageSpecand a custom license storage implementation).
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK/SystemImageSpec.cs | Deletes unused public system-image spec type. |
| src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK/IProgressMonitor.cs | Removes unused IProgressMonitorFactory interface. |
| src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK/Common/IAndroidComponentDescriptor.cs | Deletes unused component-descriptor interface. |
| src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK/Common/IAndroidArchive.cs | Deletes unused archive interface. |
| src/Xamarin.Installer.AndroidSDK/Xamarin.Installer.AndroidSDK/Common/CustomVSAndroidLicensesStorage.cs | Deletes unused custom license storage implementation. |
| src/Xamarin.AndroidTools/Utils.cs | Deletes obsolete utility shim with no remaining callers. |
| src/Xamarin.AndroidTools/Sdks/RegistryEx.cs | Deletes unused registry helper implementation. |
| src/Xamarin.AndroidTools/OS.cs | Removes now-dead embedded RegistryEx helper from OS.cs. |
| src/Xamarin.AndroidTools/Debugging/ExecutionConfiguration.cs | Removes unused constructor overload taking a string run command. |
| src/Xamarin.AndroidTools/Debugging/AmIntentCommandParser.cs | Deletes unused am command parser implementation. |
| src/Xamarin.AndroidTools/AndroidVersion.cs | Removes unused legacy extension method AndroidVersionExtensions. |
| src/Mono.AndroidTools/Util/Win32Interop.cs | Deletes unused Win32 interop/pinvoke definitions. |
| src/Mono.AndroidTools/Internal/AdbStartWindowsServerProcess.cs | Deletes unused Windows-specific adb start-server workaround implementation. |
| src/Mono.AndroidTools/Internal/AdbStartServerProcess.cs | Deletes unused adb start-server process wrapper and related interface. |
| src/Mono.AndroidTools/Adb/DeviceConnection.cs | Deletes unused direct adb-daemon connection implementation. |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #11607.
The three inlined
android-platform-supportprojects (src/Xamarin.AndroidTools/,src/Mono.AndroidTools/,src/Xamarin.Installer.AndroidSDK/) ship viaMicrosoftAndroidSdkOutDir, but a lot of their surface area is dead. This pass deletes public (and a handful of related internal) types that have zero callers anywhere in the repo and are not transitively reachable from the live external surface (the bits consumed byXamarin.Android.Build.Debugging.TasksandXamarin.Installer.Build.Tasks).Verified by iterative delete + build: all five affected projects build clean.
Summary
Mono.AndroidToolsDeviceConnection,AdbStartServerProcess,AdbStartWindowsServerProcess,IAdbStartServerProcess,Win32Interopand its P/Invoke types (CreateProcessFlags,HandleFlags,ProcessInfo,ProcessWaitHandle,SafeProcessHandle,SecurityAttributes,StartF,StartupInfo)Xamarin.AndroidToolsRegistryEx(file + nested),Wow64,AndroidVersionExtensions,Utils,AmIntentCommandParser, deadExecutionConfiguration(string, string)overloadXamarin.Installer.AndroidSDKCustomVSAndroidLicensesStorage,SystemImageSpec,IAndroidArchive,IAndroidComponentDescriptor,IProgressMonitorFactory