Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Add deprecation mechanism for aliases #47419

Open
MiYanni opened this issue Mar 10, 2025 · 0 comments
Open

CLI: Add deprecation mechanism for aliases #47419

MiYanni opened this issue Mar 10, 2025 · 0 comments
Labels
Area-CLI Feature Request untriaged Request triage from a team member

Comments

@MiYanni
Copy link
Member

MiYanni commented Mar 10, 2025

Summary

I've began looking over the surface of the CLI and I'm beginning to recognize the inconsistencies. To allow us to "smooth over" these inconsistencies, we need a mechanism to mark aliases for deprecation. This primarily applies to aliases for now as explained by the process below.

Process

To deprecate things (commands/options/arguments), a process similar to this should occur:

  • Create an alias to the current thing and rename the actual thing
  • Add the deprecating mechanism to the alias
    • When the user uses the alias, they should get a deprecation message that this thing will be removed in a future update and they should use "other thing" instead.
    • Allow for an environment variable to disable these deprecation messages. By default, deprecation messages will be shown in interactive mode (see Chet's recent PR on detecting interactive mode) and deprecation messages will be disabled in non-interactive mode.

An additional check would be nice:

  • Create a unit test that can gather the deprecated items and check if they're no longer valid
    • Basically, we have an automatic process that when we update the repo version information, this unit test would tell us what is now deprecated or not, and we can decide to remove them.
      • To accomplish this, that means when deprecations are added, they need to be marked with a version number.
    • Work with Marc/Chet to figure out a good deprecation cycle and use that as the version check logic for deprecation messages.

Bonus points(?):

  • Allow a way to retrieve deprecated information for release notes
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CLI Feature Request untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

1 participant