[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Backport of r20042 (Improve usability for Svn::Core::Dirent::time...)

From: Kobayashi Noritada <nori1_at_dolphin.c.u-tokyo.ac.jp>
Date: 2006-07-11 18:51:15 CEST

Hi,

> > > I was looking at the remaining backport proposals, and this one stuck
> > > out in my mind. Is it really a valid change from a backwards
> > > compatibility standpoint? What about old code that expected
> > > Dirent#time to return an integer?
> >
> > Dirent#time should return a Time because of its name. Returning a Time is
> > a correct behaviour and returning an Integer is not so good. The Integer
> > value is completely useless because it cannot be converted without knowing
> > what APR-time integer means and how to convert it to a Time. Other
> > methods returning time-related values already do that conversion inside
> > and returns a Time, and Dirent#time follows that manner in this change.
> > So, I think this is an improvement close to a minor-buglet fix.
> >
> > Those who expect it returns an Integer can now use Dirent#_time to get
> > the value, but no one would like to do so... (I wonder how many users
> > have used older Dirent#time without getting skeptical about the behaviour.)
>
> That makes perfect sense, but it still breaks our compatibility policy
> by making people fix their code when they upgrade. There are a lot of
> functions in the public Subversion API that I'd LOVE to change to make
> them "better" in some way, but I can't because people are already
> using them. Aren't there potentially already people using the
> Dirent#time method from 1.3.x who are assuming it returns an integer?
>
> So, in short, no argument that it's a better API, but that doesn't
> make it right.

Umm..., I see. I know the policy. I was kidding myself only because it
is clearly not a good API and it is a binding issue... So I'd love to
write another patch to keep the backward compatibility.

Kouhei, which is a better way, to add another method returning a Time
(whose name I cannot think of...) to Dirent, or to add an argument which
can adjust a type of the return value?

Thanks,

-nori

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 11 18:51:43 2006

This is an archived mail posted to the Subversion Dev mailing list.