[R-SIG-Mac] Rebuild binaries when a LinkingTo dependency changes

Kirill Müller k|r||| @end|ng |rom cynkr@@com
Mon Sep 25 20:46:11 CEST 2023


Hi


The TMB package has Matrix in its LinkingTo dependencies. In a clean 
package library, I see behavior posted below.

Should the TMB package have been rebuilt when a new version of the 
Matrix package was pushed? More general, should we rebuild all reverse 
LinkingTo dependencies of a package that gets an update on CRAN? This 
will mean a lot of package rebuilds with Rcpp, but also a lot less 
frustration down the road. Thanks!


Best regards

Kirill


dir.create("templib")
.libPaths(normalizePath("templib"))

# Sanity check
rownames(installed.packages())
#>  [1] "base"       "boot"       "class"      "cluster" "codetools"
#>  [6] "compiler"   "datasets"   "foreign"    "graphics" "grDevices"
#> [11] "grid"       "KernSmooth" "lattice"    "MASS" "Matrix"
#> [16] "methods"    "mgcv"       "nlme"       "nnet" "parallel"
#> [21] "rpart"      "spatial"    "splines"    "stats" "stats4"
#> [26] "survival"   "tcltk"      "tools"      "utils"
packageVersion("Matrix")
#> [1] '1.5.4.1'

# Install fresh binary packages
install.packages(c("Matrix", "TMB"))
#> Installing packages into 
'/private/var/folders/dj/yhk9rkx97wn_ykqtnmk18xvc0000gn/T/RtmpXIjIPy/reprex-87aa25cc1fa4-sugar-cob/templib'
#> (as 'lib' is unspecified)
#> also installing the dependencies 'Rcpp', 'RcppEigen'
#>
#> The downloaded binary packages are in
#> 
/var/folders/dj/yhk9rkx97wn_ykqtnmk18xvc0000gn/T//Rtmp4GSL7m/downloaded_packages
packageVersion("Matrix")
#> [1] '1.6.1.1'

# Perform implicit consistency check
requireNamespace("TMB")
#> Loading required namespace: TMB
#> Warning in checkMatrixPackageVersion(): Package version inconsistency 
detected.
#> TMB was built with Matrix version 1.6.0
#> Current Matrix version is 1.6.1.1
#> Please re-install 'TMB' from source using install.packages('TMB', 
type = 'source') or ask CRAN for a binary version of 'TMB' matching 
CRAN's 'Matrix' package



More information about the R-SIG-Mac mailing list