Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 24, 2025

Follow-up to #51661 (StatInterop.cs removal). Identified and removed additional dead code with no references in the codebase.

Files Removed

  • TopLevelCommandParserResult.cs - Internal class, never instantiated
  • OutputPathCommandResolver.cs - Command resolver, not used by any policy
  • PathCommandResolverPolicy.cs - Resolver policy, never instantiated
  • DepsJsonCommandResolver.cs - Command resolver, not used by any policy

These resolvers are not wired into DefaultCommandResolverPolicy or ScriptCommandResolverPolicy. Verified via grep that no code references these types.

Original prompt

In #51661 we removed a file that was no longer in use. Can you look through the repo and determine if there are any other files that are safe to remove?


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Following PR #51661, this removes additional unused files:
- TopLevelCommandParserResult.cs - internal class with no references
- OutputPathCommandResolver.cs - unused command resolver
- PathCommandResolverPolicy.cs - unused command resolver policy
- DepsJsonCommandResolver.cs - unused command resolver

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove additional unused files from the repository Remove unused command resolver and parser files Nov 24, 2025
Copilot AI requested a review from marcpopMSFT November 24, 2025 22:59
Copilot finished work on behalf of marcpopMSFT November 24, 2025 22:59
@marcpopMSFT marcpopMSFT marked this pull request as ready for review December 5, 2025 21:21
Copilot AI review requested due to automatic review settings December 5, 2025 21:21
Copy link
Contributor

Copilot AI left a comment

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 four unused files from the command resolution infrastructure as a follow-up to PR #51661. The removed files contain command resolvers and a parser result class that are never instantiated or referenced anywhere in the codebase.

Key changes:

  • Removed TopLevelCommandParserResult.cs - an internal class with no references
  • Removed three command resolver classes (OutputPathCommandResolver, PathCommandResolverPolicy, DepsJsonCommandResolver) that are not wired into the active resolver policies (DefaultCommandResolverPolicy or ScriptCommandResolverPolicy)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
TopLevelCommandParserResult.cs Removed unused internal parser result class that was never instantiated
PathCommandResolverPolicy.cs Removed unused resolver policy that was never instantiated or used by command resolution pipeline
OutputPathCommandResolver.cs Removed unused path-based command resolver that extended AbstractPathBasedCommandResolver but was never added to any composite resolver
DepsJsonCommandResolver.cs Removed unused deps.json-based command resolver that was never integrated into the command resolution pipeline

@marcpopMSFT
Copy link
Member

@dsplaisted I asked copilot to identify and remove unused code. Here's what it came up with. Since things build, that's the only validation we really have. I did a search internally and externally and the only references I found externally were clones/forks of our own repos. Seems safe enough.

@dsplaisted
Copy link
Member

/cc @baronfel

Seems kind of related to #45251, but in this case the command resolvers aren't actually being used at all.

@marcpopMSFT marcpopMSFT merged commit e300dea into main Dec 5, 2025
30 checks passed
@marcpopMSFT marcpopMSFT deleted the copilot/remove-unused-files branch December 5, 2025 23:22
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.

3 participants