zowe / zowe-cli

Zowe CLI
Eclipse Public License 2.0
108 stars 85 forks source link

Deprecation of Commands Requires Replacement Command #2041

Open awharn opened 4 months ago

awharn commented 4 months ago

Describe the bug

If a command is deprecated, the functionality in Imperative only handles if a command was deprecated with a suggested replacement. With the deprecation of IMS, there is no replacement for any of these commands. The function should be able to take in an empty string for the recommended replacement, and if the string is empty, it should not display the recommended replacement message.

https://github.com/zowe/zowe-cli/blob/5667624c0571af3a0cf748750b19c9deba7a129e/packages/imperative/src/utilities/src/CliUtils.ts#L379-L395

Additional context

This could also be considered an enhancement, but with V2 entering maintenance soon, I believe this should qualify as a bug fix. This will allow extenders to add this message to any deprecated plug-ins / commands that may go away in the future, and potentially begin to warn consumers in V2. There is currently no way to warn consumers of a deprecated command without a replacement, aside from displaying the line Recommended replacement: none.

github-actions[bot] commented 4 months ago

Thank you for creating a bug report. We will investigate the bug and evaluate its impact on the product. If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.

gejohnston commented 4 months ago

Would it be beneficial to the consumer if apps supply replacement text that is similar to the following text? "Obsolete component. No replacement exists."