[Rd] Upgrading a package to which other packages are LinkingTo
kirill.mueller at ivt.baug.ethz.ch
Fri Dec 16 11:35:08 CET 2016
I'd like to suggest to make R more informative when a user updates a
package A where there's at least one package B that has "LinkingTo: A"
in its description.
To illustrate the problem, assume package A is updated so that its C/C++
header interface (in inst/include) is changed. For package B to pick up
these changes, we need to reinstall package A. In extreme cases, if B
also imports A and uses functions from A's shared library, failure to
reinstall B may lead to all sorts of undefined behavior.
I've stumbled over this recently for A = Rcpp 0.12.8 and B = dplyr 0.5.0
, with a bug fix available in Rcpp 0.12.8.2. Simply upgrading Rcpp to
0.12.8.2 wasn't enough to propagate the bug fix to dplyr; we need to
reinstall dplyr 0.5.0 too.
I've prepared an example with R-devel r71799. The initial configuration
 is Rcpp 0.12.8 and dplyr 0.5.0. There is no warning from R after
upgrading Rcpp to 0.12.8.2 , and no warning when loading the (now
"broken") dplyr 0.5.0 linked against Rcpp 0.12.8 but importing Rcpp
As a remedy, I'd like to suggest that upgrading Rcpp gives a warning
about installed packages that are LinkingTo it , and that loading
dplyr gives a warning that it has been built against a different version
of Rcpp , just like the warning when packages are built against a
different version of R.
More information about the R-devel