Skip to content

Remove obsolete misspelled IncompatibleCpuAbiExceptiopn class and dead code references#11597

Merged
jonathanpeppers merged 3 commits into
mainfrom
copilot/fix-finder-remove-dead-code
Jun 8, 2026
Merged

Remove obsolete misspelled IncompatibleCpuAbiExceptiopn class and dead code references#11597
jonathanpeppers merged 3 commits into
mainfrom
copilot/fix-finder-remove-dead-code

Conversation

Copilot AI commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

IncompatibleCpuAbiExceptiopn (note typo) is never thrown — only the correctly-spelled IncompatibleCpuAbiException is. Since the misspelled class inherits from the correct one, the base case already catches all instances, making these branches dead code.

  • Removed case IncompatibleCpuAbiExceptiopn e: branch and surrounding #pragma warning disable/restore CS0618 in FastDeploy.cs
  • Removed duplicate nameof(IncompatibleCpuAbiExceptiopn) entry and surrounding pragma from error_codes list in FastDeploy.cs
  • Deleted the misspelled IncompatibleCpuAbiExceptiopn class declaration and its [Obsolete] attribute from AdbException.cs

… FastDeploy.cs

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove dead code referencing obsolete IncompatibleCpuAbiExceptiopn Remove dead code referencing obsolete IncompatibleCpuAbiExceptiopn in FastDeploy.cs Jun 7, 2026
Copilot AI requested a review from jonathanpeppers June 7, 2026 02:55
@jonathanpeppers

Copy link
Copy Markdown
Member

@copilot can you also delete the misspelled IncompatibleCpuAbiExceptiopn

…n.cs

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot can you also delete the misspelled IncompatibleCpuAbiExceptiopn

Done — deleted the IncompatibleCpuAbiExceptiopn class from AdbException.cs and confirmed zero remaining references in the repo. See commit e0b2e3e.

Copilot AI changed the title Remove dead code referencing obsolete IncompatibleCpuAbiExceptiopn in FastDeploy.cs Remove obsolete misspelled IncompatibleCpuAbiExceptiopn class and dead code references Jun 8, 2026
@jonathanpeppers jonathanpeppers marked this pull request as ready for review June 8, 2026 15:42
Copilot AI review requested due to automatic review settings June 8, 2026 15:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 IncompatibleCpuAbiExceptiopn branch (and associated CS0618 pragmas) from FastDeploy error-code mapping.
  • Removed the obsolete nameof(IncompatibleCpuAbiExceptiopn) entry (and associated pragmas) from FastDeploy message-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";

Comment thread src/Mono.AndroidTools/AdbException.cs

@jonathanpeppers jonathanpeppers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test failures unrelated.

@jonathanpeppers jonathanpeppers merged commit 5fdeb25 into main Jun 8, 2026
3 of 4 checks passed
@jonathanpeppers jonathanpeppers deleted the copilot/fix-finder-remove-dead-code branch June 8, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix-finder] Remove dead code referencing obsolete IncompatibleCpuAbiExceptiopn in FastDeploy.cs

3 participants