From murdoch.duncan at gmail.com  Thu Oct 20 17:41:22 2011
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Thu, 20 Oct 2011 11:41:22 -0400
Subject: [Rd] RFC: 'igraph' package update and backward compatibility
In-Reply-To: <CABdHhvEUeXmsQRQx4fax6WaVu31r4=-AkVmrzkqTKgOnFk+HoQ@mail.gmail.com>
References: <CABtg=KkMw9Yxk+pQWYkw9A1LLuCYqztAw027XSiteZmTCfpHJw@mail.gmail.com>
	<CABdHhvEUeXmsQRQx4fax6WaVu31r4=-AkVmrzkqTKgOnFk+HoQ@mail.gmail.com>
Message-ID: <4EA04122.50707@gmail.com>

On 11-10-20 10:56 AM, Hadley Wickham wrote:
>> My package will have an update soon, that is not backward compatible
>> with the current version. It will likely break much of the existing
>> code. Many (~50) packages depend on 'igraph' and they, too,  will most
>> probably break with the new version.
>>
>> My intended solution is, that I create a snapshot of the current
>> package, under another name (igraph0), and ask package maintainers to
>> depend on that version. Then, after a short time, I'll update the
>> current igraph version.
>
> The optimal solution would be if R packages could depend on a specific
> version of a package, and a user could have multiple packages
> installed, and different versions loaded simultaneously so that
> different packages could depend on different versions.  This is what
> (e.g.) ruby gems do. Unfortunately this is a hard problem to solve -
> namespaces go some way to help, but I think there are still
> outstanding S3 and S4 issues.

We did have an attempt at that for some versions, but I don't think it 
ever achieved all of its goals, and we've dropped it.

I'm not sure it would be "optimal" even if it was completely 
implemented.  It introduces a lot of complexity.  Simplicity is better, 
even if it is sometimes more work.

>
> My work around of renaming packages after API breaking changes is
> definitely a sub-optimal fix.

Yes.  The optimal solution would be for all the packages that use yours 
to update to the latest version.  More work, but they end up in a better 
place.  (Or even better, if all package writers got it right the first 
time :-).

Duncan Murdoch



[Rd] RFC: 'igraph' package update and backward compatibility
Duncan Murdoch