Skip to content

CommandResolver is redundant #1217

@fmbenhassine

Description

@fmbenhassine

CommandResolver is documented as "useful to have fully dynamic set of commands which may exists only if some conditions in a running shell are met. For example if shell is targeting arbitrary server environment some commands may or may not exist depending on a runtime state". But we already have features like that from Spring Framework (@Conditional) and Spring Boot (@ConditionalOnXXX) with their programmatic equivalent.

Moreover, as documented in https://docs.spring.io/spring-shell/reference/3.2/appendices/techintro/commandcatalog.html#command-resolver, this resolver can impact the performance of the shell:

Important

A current limitation of a CommandResolver is that it is used every time commands are resolved. Thus, we advise not using it if a command resolution call takes a long time, as it would make the shell feel sluggish.

This feature and the associated API are redundant and can be deprecated/removed to simplify the framework.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions