From: "Berger, Daniel" Date: 2005-10-06T00:14:01+09:00 Subject: Re: Ruby 1.8.3 breaks Needle's logger? > -----Original Message----- > From: Yukihiro Matsumoto [mailto:matz@ruby-lang.org] > Sent: Wednesday, October 05, 2005 8:40 AM > To: ruby-talk ML > Subject: Re: Ruby 1.8.3 breaks Needle's logger? > > > Hi, > > In message "Re: Ruby 1.8.3 breaks Needle's logger?" > on Wed, 5 Oct 2005 23:01:48 +0900, "Gavin Sinclair" > writes: > > |A non-backwards-compatible change in a minor release sounds > like a bad > |idea. 1.8.3 has been officially released, yeah? But I'd > like to know > |if this change was made intentionally, and whether such > changes will be > |made in future. > > See [ruby-talk:159143]. It's a minor internal change, which > _normally_ other libraries are not suppose to depend. > Unfortunately the author did not know there are several > programs that depends on the internal. > > matz. The problem was a hard coded "Format" constant in the Logger class that defined the format. This was bad, but not fatal. The ActiveRecord/Nitro/Needle/Glue, etc, folks made it worse when, instead of subclassing, they redefined the Logger class and did things like 'remove_const "Format"', among other questionable decisions. I'm not sure who wrote that code first but it was, unfortunately, copied and used by several authors. This issue was brought to the fore in Zed Shaw's rant, "The Chainsaw Infanticide Logger Manuever" (ruby-talk:153380), which some folks missed because the mailing list gateway was broken at the time. Anyway, after that rant, myself and some other folks on IRC did some brainstorming and came up with various ways to make the logging format more flexible. I sent an email to NaHi about making a change, and he accepted the notion in principle. After some friendly back and forth, he settled on his own solution. That solution included moving the 'Format' constant under a Formatter class, and that's why some current code breaks. To call the code 'non-backwards-compatible' is a bit of a stretch, though, since the code that is broken by this change is of, shall we say, highly questionable design. Regards, Dan