RE: [Rails-core] Deprecation with a Difference

2006-07-27 Thread Bob Silva
-core@lists.rubyonrails.org Subject: Re: [Rails-core] Deprecation with a Difference   I think this is an ideal warning and a good incentive to follow good practises and 'move on'. It not only avoids nasty surprises, but also forces you to re-think your code to ensure your tests no longer

Re: [Rails-core] Deprecation with a Difference

2006-07-26 Thread Michael Koziarski
That would depend on how they decide to implement it. If they use the same method to warn about all deprecations, changing it to raise would be as simple as overriding that method. This has been committed now. As you can see from deprecation_test.rb in activesupport, it's fairly easy to monkeyp

Re: [Rails-core] Deprecation with a Difference

2006-07-26 Thread Jamis Buck
Caio Chassot wrote: On 2006-07-26, at 16:16 , Kevin Clark wrote: The things that are planned sound great. Expanding on Ryan's idea, I think using deprecated methods should be considered an error. Once the code goes in, I'd like to write a plugin that raises a deprecation exception (when in the

Re: [Rails-core] Deprecation with a Difference

2006-07-26 Thread James Adam
On 7/26/06, Ryan Lowe <[EMAIL PROTECTED]> wrote: The downside is that it could clutter the test run output at the console (I don't usually check the test logs for output, so error messages there would go unnoticed) ... I understand if this suggestion isn't liked because of that reason, I just tho

Re: [Rails-core] Deprecation with a Difference

2006-07-26 Thread Rick Olson
On 7/26/06, Ryan Lowe <[EMAIL PROTECTED]> wrote: Suggestion: how about printing something during the "rake" test run to indicate you are using deprecated methods? After I update rails for a project, the first thing I do is run "rake" to make sure nothing broke. Some deprecation warnings here wo

Re: [Rails-core] Deprecation with a Difference

2006-07-26 Thread Caio Chassot
On 2006-07-26, at 16:16 , Kevin Clark wrote: The things that are planned sound great. Expanding on Ryan's idea, I think using deprecated methods should be considered an error. Once the code goes in, I'd like to write a plugin that raises a deprecation exception (when in the test environment) if

Re: [Rails-core] Deprecation with a Difference

2006-07-26 Thread Scott Barron
On Jul 26, 2006, at 2:11 PM, Ryan Lowe wrote: Suggestion: how about printing something during the "rake" test run to indicate you are using deprecated methods? After I update rails for a project, the first thing I do is run "rake" to make sure nothing broke. Some deprecation warnings here wou

Re: Re: [Rails-core] Deprecation with a Difference

2006-07-26 Thread Kevin Clark
The things that are planned sound great. Expanding on Ryan's idea, I think using deprecated methods should be considered an error. Once the code goes in, I'd like to write a plugin that raises a deprecation exception (when in the test environment) if deprecated methods are used. I trust it's just

Re: [Rails-core] Deprecation with a Difference

2006-07-26 Thread Ryan Lowe
Suggestion: how about printing something during the "rake" test run to indicate you are using deprecated methods? After I update rails for a project, the first thing I do is run "rake" to make sure nothing broke. Some deprecation warnings here would bring it to people's attention. The downside

Re: [Rails-core] Deprecation with a Difference

2006-07-25 Thread Jamie van Dyke
I think this is an ideal warning and a good incentive to follow good practises and 'move on'.  It not only avoids nasty surprises, but also forces you to re-think your code to ensure your tests no longer blurt out piles of deprecation warnings, but also that your logs don't grow out of control befo

Re: [Rails-core] Deprecation with a Difference

2006-07-25 Thread Mat Schaffer
On Jul 25, 2006, at 9:23 PM, Michael Koziarski wrote: This unrepentant spamming is deliberate. Unlike some other frameworks you may use, a deprecation warning in rails isn't a threat, it's a promise. It will be removed in the next major rails release. So, what are people's thoughts abo

Re: [Rails-core] Deprecation with a Difference

2006-07-25 Thread Michael Koziarski
That would probably be useful. I'd also like to see a rake task that greps the app for deprecated calls. It might not be able to catch all of them, but it should be able to find simple things like find_first and @content_for_layout. The grepping would actually be really difficult to make reliabl

Re: [Rails-core] Deprecation with a Difference

2006-07-25 Thread Michael Koziarski
On Jul 25, 2006, at 6:23 PM, Michael Koziarski wrote: > So, what are people's thoughts about the warning methods, will it > get your attention? Works for me, especially if it has some link to what the preferred way of doing things is. My Thoughts there are that the api docs should contain th

Re: [Rails-core] Deprecation with a Difference

2006-07-25 Thread Deirdre Saoirse Moen
On Jul 25, 2006, at 6:23 PM, Michael Koziarski wrote: So, what are people's thoughts about the warning methods, will it get your attention? Works for me, especially if it has some link to what the preferred way of doing things is. -- _Deirdre h

Re: [Rails-core] Deprecation with a Difference

2006-07-25 Thread Josh Susser
On Jul 25, 2006, at 6:23 PM, Michael Koziarski wrote: Rails has been around for a while, and it's about time we got serious about deprecating APIs which we no longer intend to support. Without getting into a discussion about which code precisely is going to be deprecated, I thought I'd descri