Skip to content
Prev 41545 / 63424 Next

RFC: 'igraph' package update and backward compatibility

Yes, I remembered it used to be possible to do versioned installs, but
I don't think you could ever have them loaded simultaneously.
But the current simplicity also makes more work - each time a new
package is uploaded to CRAN all dependencies need to be rechecked.
That would not be the case if packages could specify versioned
dependencies.

Another problem that I face is that I often release a new version of
plyr at the same time as a new version of ggplot2.  The new version of
ggplot2 requires the latest version of plyr, but
install.packages("ggplot2") will not reinstall plyr if it is present
but an outdated version.  Dependencies are checked at build time, but
not install time.
The problem is not just packages, but reproducible code in general.
As it stands currently, to make sure a script continues to work in the
long run you need a library containing the versions of the packages
you used at the time. It would be a little easier if you could do
library("ggplot2", version = 0.85) or similar.  (Ignoring the other
difficulties of capturing the current version of R, other system
libraries, OS, hardware etc).

Generally, the absence of versioned dependencies makes it extremely
difficult to aggressively improve the design of a package. You are
locked into your first attempt at an API because it is so difficult
for users to work with the non-latest version.  Namespaces help with
this a little (by not exporting experimental functions), but I find
there are many initial design decisions that I now regret in ggplot2,
and I can not easily remedy them without breaking large amounts of
existing code or starting work on ggplot3.

Hadley