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

(#2462) Add deprecation notices for list with remote sources before making it local only #2626

Conversation

AdmiringWorm
Copy link
Member

Description Of Changes

This pull request deprecates the argument local only and the arguments only relevant when calling remote sources when the list command is used.

Additionnaly it also adds several deprecation noticed both in the help page, as well as when running the list command to ensure that users are truly notified of the change to make it local only in v2.0.0.

Motivation and Context

To make the list command only handle local/installed packages, and to notify users to the best of our ability that this change will happen.

Testing

  1. Run build.bat to ensure that the build and unit tests has not been broken
  2. Run choco list chocolatey and ensure that there is a warning mentioning the list command will be made local only
  3. Run choco list chocolatey --noop and ensure the same as step 2.
  4. Run choco list chocolatey --local-only and ensure there is no deprecation notice displayed.
  5. Run choco list chocolatey --local-only --noop and ensure the same as step 4.
  6. Run choco list --help and ensure there is a correct deprecate notice at the top, each remote argument + local only argument is mentioned with a deprecation notice and that the alternative sources will be removed in the list command.
  7. Run choco search chocolatey and ensure there is no deprecation notice displayed.
  8. Run choco search chocolatey --noop and ensure the same as step 7.
  9. Run choco search chocolatey --local-only and ensure the same as step 7.
  10. Run choco search chocolatey --local-only --noop and ensure the same as step 7.
  11. Run choco search --help and ensure the only deprecation notice is for the list example.
  12. Repeat step 7-11 using the find command.

Change Types Made

  • Bug fix (non-breaking change)
  • Feature / Enhancement (non-breaking change)
  • Breaking change (fix or feature that could cause existing functionality to change)
  • PowerShell code changes.

Related Issue

Fixes #2462

Change Checklist

  • Requires a change to the documentation
  • Documentation has been updated
  • Tests to cover my changes, have been added
  • All new and existing tests passed.
  • PowerShell v2 compatibility checked.

@AdmiringWorm AdmiringWorm self-assigned this Mar 8, 2022
@AdmiringWorm AdmiringWorm requested a review from gep13 March 8, 2022 16:42
@AdmiringWorm AdmiringWorm force-pushed the 2462-Add-deprecation-notices-for-all-things-that-are-set-to-change-in-v200 branch from 2fc8d52 to 45265d9 Compare March 9, 2022 09:52
This commit updates the list command to deprecate
the argument `--local-only` and arguments only valid
for remote sources when running the list command,
with a message that list will be made local only by default
in v2.0.0. The same message mentions to use search or find
instead for remote searches.

There are additionally several messages other places to ensure
that it will be difficult to miss the deprecation of remote
sources when calling the list command.
@gep13 gep13 force-pushed the 2462-Add-deprecation-notices-for-all-things-that-are-set-to-change-in-v200 branch from 45265d9 to 971290a Compare March 10, 2022 08:45
gep13 added 4 commits March 10, 2022 10:54
codeing -> coding
Previously, only search and list was shown, but makes sense to show
all available aliases in the usage section.
This meant an update to the unit tests that are asserting on this
message being shown.
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gep13 gep13 merged commit 49c781f into chocolatey:develop Mar 10, 2022
@AdmiringWorm AdmiringWorm deleted the 2462-Add-deprecation-notices-for-all-things-that-are-set-to-change-in-v200 branch March 10, 2022 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add deprecation notices for all things that are set to change in v2.0.0
2 participants