zowe-cli icon indicating copy to clipboard operation
zowe-cli copied to clipboard

Deprecation of Commands Requires Replacement Command

Open awharn opened this issue 1 year ago • 2 comments

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.

awharn avatar Feb 08 '24 15:02 awharn

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.

github-actions[bot] avatar Feb 08 '24 15:02 github-actions[bot]

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

gejohnston avatar Feb 08 '24 16:02 gejohnston