Project

General

Profile

Refactor #33225

Change the way an option is checked for deprecation

Added by Oleh Fedorenko about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Hammer core
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Currently we check whether we need to show a deprecation warning for an option through #handles? method [1]. This has a side-effect: whenever we call #find_option, internally it uses #handles? method, so whenever we're searching for an option we will print a deprecation warning if the option has one.

[1] - https://github.com/theforeman/hammer-cli/blob/819023cca20eb8ec1853dd5f901e3e2d0dc0a948/lib/hammer_cli/options/option_definition.rb#L53-L61

Associated revisions

Revision 7f0e5338 (diff)
Added by Oleh Fedorenko about 1 year ago

Fixes #33225 - Show depr warning only on option usage

Revision 73a3c556
Added by yifat makias about 1 year ago

Merge pull request #351 from ofedoren/ref-33225-opt-depr-way

Fixes #33225 - Show depr warning only on option usage

History

#1 Updated by The Foreman Bot about 1 year ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli/pull/351 added

#2 Updated by The Foreman Bot about 1 year ago

  • Fixed in Releases hammer-cli-3.1.0 added

#3 Updated by Oleh Fedorenko about 1 year ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF