-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Deprecate - Class#superclass_delegating_accessor #14271
Conversation
akshay-vishnoi
commented
Mar 4, 2014
Any update on this? |
Sorry, I must be missing some context here. What's the bug here? I am not familiar with this method and it has no docs. Is that even public API? Can you fill me in? Thanks 😄 |
|
@chancancode Any update on this? 😄 |
I still don't know what this method does =/ If it's a public API we should add docs? If not we should |
Any update on this? |
I'll take a look today. |
Thanks @wycats |
Any update on this? |
I don't think |
Definitely +1 for deprecating this. |
I'm pretty sure this was an earlier experiment before we settled on |
Should I update the PR?
|
Please do, just add a deprecation now for master/4.2, and we remove in the next version. It's not gonna be a problem for Rails, but other libs might be using it in ways we don't know, so deprecating first is always better. |
Okay I will add deprecation warning and corresponding test cases.
cc @carlosantoniodasilva, @wycats, @thedarkone - Any thoughts? |
I think it's not necessary to change code/tests we're going to rm, specially because we haven't received issues related to this piece of code in a long time as far as I remember. We can just go ahead and deprecate it as is. Thanks! |
Sorry for late reply. I will do it today. Thanks for help!!! |
@carlosantoniodasilva Please check the updated code. |
Can you add a test that shows it's deprecated, and a changelog entry? It may also need to require the related deprecation file. Thanks. |
@carlosantoniodasilva: Please check updated code.
Thanks |
@akshay-vishnoi : Could you please rebase your branch ? It doesn't apply cleanly. Also it would be nice if you could update the PR title and description accordingly. Thanks for your contribution! 👍 |
|
Looks good, however I think now other tests will show warnings when running the suite, maybe we should silence those? Thanks @akshay-vishnoi |
If we are going to deprecate we need to tell our users what they have to use instead. I searched on GitHub and there are a lot of ocorrences of this method https://github.com/search?p=1&q=superclass_delegating_accessor&type=Code |
@rafaelfranca I am also working on it, I can extract a gem for this. So we can refer to it if necessary. |
@akshay-vishnoi the deprecation message should refer users to
@rafaelfranca wow, that's a lot of code... but clicking through random pages, it all looks to be either vendored Rails code or an old (also vendored) version of active_merchant. |
@rafaelfranca : Could you please help, actually when I am running test cases it is showing the warning and full backtrace, but when I am using rails as a gem then it is not showing the backtrace but only warning. What could be the possible reason? Although all test cases are running and there is no error or failure, but I am not getting how to stop these backtraces. |
You can use |
I have already used |
Okay it has been set in |
I think you can use |
@rafaelfranca : Please check updated code. Will this work? |
@rafaelfranca : Any updates? |
@@ -1,3 +1,7 @@ | |||
* Deprecate `Class#superclass_delegating_accessor`. |
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.
You can also add a comment to use class_attribute
instead in this changelog entry.
@akshay-vishnoi just a minor comment on the changelog, and then we're good to go. |
@carlosantoniodasilva Ya sure, Updating!!!! |
@carlosantoniodasilva : Code updated Please check. |
Deprecate superclass_delegating_accessor, use class_attribute instead.
Thanks. |
@akshay-vishnoi this is only going to be released on 4.2, which is going to take a while (considering 4.1 is in rc state), so keep it in your todo list :) |
Ohkay Thanks 💚 |
Class#superclass_delegating_accessor was deprecated in Rails 4.2.0 rails/rails#14271
Switch to Class#class_attribute instead. See rails/rails#14271
Class#superclass_delegating_accessor from Rails is now deprecated. rails/rails#14271 And uses of `superclass_delegating_accessor` use has been removed in #ffca0ca615bfa7bc99f8faae9b4ae95514a6604d and #ae02c93aaa52e4a63326d4b399bd8a9dd3977ed5
Class#superclass_delegating_accessor from Rails is now deprecated. rails/rails#14271 And uses of `superclass_delegating_accessor` use has been removed in #ffca0ca615bfa7bc99f8faae9b4ae95514a6604d and #ae02c93aaa52e4a63326d4b399bd8a9dd3977ed5
Class#superclass_delegating_accessor from Rails is now deprecated. rails/rails#14271 And uses of `superclass_delegating_accessor` use has been removed in #ffca0ca615bfa7bc99f8faae9b4ae95514a6604d and #ae02c93aaa52e4a63326d4b399bd8a9dd3977ed5