Skip to content

CLI-329: introduce to Options the tracking of deprecated short and long opts#251

Closed
epugh wants to merge 2 commits into
apache:masterfrom
epugh:CLI-329
Closed

CLI-329: introduce to Options the tracking of deprecated short and long opts#251
epugh wants to merge 2 commits into
apache:masterfrom
epugh:CLI-329

Conversation

@epugh

@epugh epugh commented Mar 26, 2024

Copy link
Copy Markdown
Contributor

This allows you to migrate from a previous old short options to new ones.

In the Apache Solr project we would use it to support the migration of -zkHost to --zk-host for example by allowing the deprecated command line -zkHost to function, but logging an warning to the user with the preferred option name.

@codecov-commenter

codecov-commenter commented Mar 26, 2024

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.28%. Comparing base (9f6b23b) to head (a6161da).
⚠️ Report is 726 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #251      +/-   ##
============================================
+ Coverage     91.90%   92.28%   +0.38%     
- Complexity      575      606      +31     
============================================
  Files            22       22              
  Lines          1247     1297      +50     
  Branches        210      215       +5     
============================================
+ Hits           1146     1197      +51     
+ Misses           63       60       -3     
- Partials         38       40       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@epugh epugh changed the title CLI-329: introduct to Options the tracking of deprecated short and long opts CLI-329: introduce to Options the tracking of deprecated short and long opts Mar 26, 2024
@garydgregory

garydgregory commented Mar 26, 2024

Copy link
Copy Markdown
Member

Hello @epugh
Thank you for your PR.
This is not the way to go IMO.

  • Deprecation should just be a boolean or an object that carries (a String description, a String since, and a boolean forRemoval, which is a combo of the stock annotation and Javadoc tag).
  • I don't think this library should always print to the console.
  • OptionBuilder is deprecated, we should not duplicate new features when added to Option.Builder

I propose #252

@epugh

epugh commented Mar 29, 2024

Copy link
Copy Markdown
Contributor Author

Closing in favour of #252

@epugh epugh closed this Mar 29, 2024
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.

3 participants