Remove obsolete misspelled IncompatibleCpuAbiExceptiopn class and dead code references#11597
Conversation
… FastDeploy.cs Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
IncompatibleCpuAbiExceptiopn in FastDeploy.cs
|
@copilot can you also delete the misspelled IncompatibleCpuAbiExceptiopn |
…n.cs Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Done — deleted the |
IncompatibleCpuAbiExceptiopn in FastDeploy.csIncompatibleCpuAbiExceptiopn class and dead code references
There was a problem hiding this comment.
Pull request overview
This PR removes a misspelled, obsolete exception type (IncompatibleCpuAbiExceptiopn) and eliminates now-dead error-mapping branches that referenced it, simplifying fast-deploy error handling and exception definitions.
Changes:
- Removed the dead
case IncompatibleCpuAbiExceptiopnbranch (and associated CS0618 pragmas) fromFastDeployerror-code mapping. - Removed the obsolete
nameof(IncompatibleCpuAbiExceptiopn)entry (and associated pragmas) fromFastDeploymessage-to-code mapping. - Deleted the misspelled public exception type from
Mono.AndroidTools.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Xamarin.Android.Build.Debugging.Tasks/Tasks/FastDeploy.cs | Removes obsolete/dead error-code mapping branches and entries tied to the misspelled exception. |
| src/Mono.AndroidTools/AdbException.cs | Removes the misspelled exception class declaration from the Mono.AndroidTools exception hierarchy. |
Comments suppressed due to low confidence (1)
src/Xamarin.Android.Build.Debugging.Tasks/Tasks/FastDeploy.cs:935
- The exception pattern variables in this switch (
e) are unused; using a discard (_) avoids unused-variable warnings and makes it clear the instance isn’t needed.
switch (ex) {
case IncompatibleCpuAbiException e:
return "ADB0020";
case RequiresUninstallException e:
return "ADB0030";
jonathanpeppers
left a comment
There was a problem hiding this comment.
Test failures unrelated.
IncompatibleCpuAbiExceptiopn(note typo) is never thrown — only the correctly-spelledIncompatibleCpuAbiExceptionis. Since the misspelled class inherits from the correct one, the basecasealready catches all instances, making these branches dead code.case IncompatibleCpuAbiExceptiopn e:branch and surrounding#pragma warning disable/restore CS0618inFastDeploy.csnameof(IncompatibleCpuAbiExceptiopn)entry and surrounding pragma fromerror_codeslist inFastDeploy.csIncompatibleCpuAbiExceptiopnclass declaration and its[Obsolete]attribute fromAdbException.cs