Skip to content

Investigate usage of the different CommandResolvers #45251

Open

Description

@baronfel

Is your feature request related to a problem? Please describe.

Command resolution for non-built-in commands goes through a complex resolution process:

compositeCommandResolver.AddCommandResolver(new MuxerCommandResolver());
compositeCommandResolver.AddCommandResolver(new DotnetToolsCommandResolver());
compositeCommandResolver.AddCommandResolver(new LocalToolsCommandResolver(currentWorkingDirectory: currentWorkingDirectory));
compositeCommandResolver.AddCommandResolver(new RootedCommandResolver());
compositeCommandResolver.AddCommandResolver(
new ProjectToolsCommandResolver(packagedCommandSpecFactory, environment));
compositeCommandResolver.AddCommandResolver(new AppBaseDllCommandResolver());
compositeCommandResolver.AddCommandResolver(
new AppBaseCommandResolver(environment, platformCommandSpecFactory));
compositeCommandResolver.AddCommandResolver(
new PathCommandResolver(environment, platformCommandSpecFactory));
compositeCommandResolver.AddCommandResolver(
new PublishedPathCommandResolver(environment, publishedPathCommandSpecFactory));

There are a number of resolvers that could apply to a specific command here, and we have no idea which of these are still in use (though we have suspicions). We should do research and/or add telemetry to help us understand which of these modes are in use (and which can be removed).

Describe the solution you'd like

I'd like to know more about which of these resolvers are used in practice by .NET authors - this would include data about:

  • the name of the command being resolved
  • the name of the resolver that resolved the command

Activity

  1. ghost added
    untriaged
    on Dec 2, 2024
  2. added and removed
    untriaged
    on Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions