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
Set deprecation warning on query command #2967
Conversation
d831411
to
b73e933
Compare
@bundlerbot try |
@bundlerbot try |
@deivid-rodriguez I think I need to rebase this |
Not sure if you planned to add some tests for the deprecation message. |
tryBuild succeeded
|
b73e933
to
96e5f73
Compare
Your are right @deivid-rodriguez I forgot 🙄
Was not on my plans 😬 but I could add one 😃 |
Up to you, if it's not too hard I think we can add them. |
96e5f73
to
2e789c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bronzdoc I mean a test checking that the deprecation text is printed to the screen when the end user uses the command. But it's not big deal, I just tried it manually and it works :)
Something I would like that we improved in the future is to be able to give the user a more specific message.
So, instead of saying:
NOTE: query command is deprecated. It will be removed on or after 2019-12-01
we could say
NOTE: query command is deprecated because of being too hard to use. It will be removed on or after 2019-12-01. Please use the alternative commands `gem search` for searching for remote gems or `gem info` for looking up information for locally installed gems.
But we can improve this in the future.
@deivid-rodriguez since Said that, I understand what you mean. Maybe we want each command to handle it's own deprecation warning?
That would be nice 👍 |
I see.
If this is easy to do and leads to better testability and similarly complex code, I'm all for it. That said, I'm happy with this PR being merged as is. |
@deivid-rodriguez I'll look into this and thanks looking at this PR |
@bundlerbot r+ |
2967: Set deprecation warning on query command r=bronzdoc a=bronzdoc # Description: We have been discouraging user for the use of the query command for a long time. ``` Summary: Query gem information in local or remote repositories Description: The query command is the basis for the list and search commands. You should really use the list and search commands instead. This command is too hard to use. ``` It's time to deprecate it. This will setup a deprecation warning whenever is used. ______________ I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md). Co-authored-by: bronzdoc <lsagastume1990@gmail.com>
Build succeeded
|
3014: Improve deprecations r=bronzdoc a=deivid-rodriguez # Description: #2967 deprecated `gem query` but it also deprecated `gem list`, `gem search`, and `gem info`, because they inherit from `gem query`. This PR undeprecates these commands by no longer inheriting from `QueryCommand`. It also adds tests to ensure that `gem query` is deprecated, but `gem list`, `gem search`, and `gem info` are not. Fixes #3008. # Tasks: - [x] Describe the problem / feature - [x] Write tests - [x] Write code to solve the problem - [ ] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md). Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
3014: Improve deprecations r=bronzdoc a=deivid-rodriguez # Description: #2967 deprecated `gem query` but it also deprecated `gem list`, `gem search`, and `gem info`, because they inherit from `gem query`. This PR undeprecates these commands by no longer inheriting from `QueryCommand`. It also adds tests to ensure that `gem query` is deprecated, but `gem list`, `gem search`, and `gem info` are not. Fixes #3008. # Tasks: - [x] Describe the problem / feature - [x] Write tests - [x] Write code to solve the problem - [ ] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md). Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
Description:
We have been discouraging user for the use of the query command for a long time.
It's time to deprecate it.
This will setup a deprecation warning whenever is used.
I will abide by the code of conduct.