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 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 thought I'd throw it out there. You could even replace the dot (.) for a passed test method with a D to indicate that the test method passed but it used a method that will be deprecated in the next release. Crazy? Ryan On 7/25/06, Jamie van Dyke <[EMAIL PROTECTED]> wrote:
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 before they are cleaned. Cheers, Jamie van Dyke Fear of Fish On 26 Jul 2006, at 02:23, Michael Koziarski wrote: Hey guys, 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 describe what's going to happen. If you run your tests, and your application calls a deprecated api you'll see the following information printed to stdout. @@@@@@@@@@ Deprecation Warning @@@@@@@@@@ Detailed Message Goes Here @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ One of these ugly printouts for every deprecated method call in your application. When your application is in development or production mode this same information will be output to your RAILS_ENV.log. 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 about the warning methods, will it get your attention? -- Cheers Koz _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core