Introduction

Building and distributing packages for Linux, macOS, and Windows in a continuous integration framework is a hallmark of the Bioconductor project. The Bioconductor Build System has evolved over years and has proven robust and resilient as the project has grown in scope, and as the underlying languages and infrastructures have evolved.

The package BiocBBSpack is an exploration of how recently developed tools in R and Bioconductor can contribute to the performance and maintainability of the build system.

Simple example

With an example we illustrate some of the most basic concepts.

The PackageSet class

suppressPackageStartupMessages({
library(BiocBBSpack)
})
coreset() # a simple collection of relatively lighteight packages
ps1 = PackageSet(coreset(), biocversion="3.10")
ps1
ps1 = add_dependencies(ps1)
ps1

The large number of dependencies for this small group of packages is characteristic. One reason for working on this package is to provide a framework for experimenting with package management processes to measure scalability. We would like to pass the responsibility for efficient installation of essential packages to R or Bioconductor utilities that are designed for this purpose. In this case, our current understanding is that the installation of dependencies can be parallelized by passing a suitable value for parameter Ncpus to install.packages via BiocManager::install.

Populating a folder with git clones of sources in a PackageSet

tf = tempfile()
dir.create(tf)
populate_local_gits(ps1, tf)
dir(tf)

For a large collection of packages this can be time-consuming but can be regarded as a one-time-charge, because updates can be conducted as needed via git pull.

Identifying an out-of-date source clone

Here we artificially back-version a package and show how to find it, comparing its version value to that in the Bioconductor repository. This task could be carried out at the git level, but that can occur in a more mature version if necessary.

okdesc = readLines(paste0(tf, "/parody/DESCRIPTION"))
baddesc = gsub("Version.*", "Version: 1.0", okdesc)
writeLines(baddesc, paste0(tf, "/parody/DESCRIPTION"))
local_gits_behind_bioc(tf)
writeLines(okdesc, paste0(tf, "/parody/DESCRIPTION")) # restore

Summary of simple example

Conceptual framework

Now that we have seen a little bit of the functionality of BiocBBSpack, let's try to spell out the concepts that must be covered in a build system support package.

Generating current source set

Provisioning builder infrastructure

Generating logs and tarballs

Package build attempts may fail, and logs must be kept and conveyed. When build succeeds, logs and tarballs are generated

Generating binaries



vjcitn/BiocBBSpack documentation built on Nov. 21, 2020, 1:18 p.m.