Travis build ignoring R package version in DESCRIPTION

bug
#1

I am developing a package at https://github.com/vallenderlab/MicrobiomeR, and we added dplyr version 0.7.8 as a dependency for our package, but when travis builds our package it updates dplyr to version 0.8.1 (you can see that at https://travis-ci.com/vallenderlab/MicrobiomeR/jobs/179355213).

It’s possible that I’m not setting up the .travis.yml file properly, but I’ve included it here for any suggestions. I have experience using travis with python, and I’ve never had this sort of issue with R and travis before.

DESCRIPTION file

Package: MicrobiomeR
Title: Analyze Microbiome Data
Version: 0.5.0
Authors@R: c(
    person("Robert", "Gilmore", email = "rgilmore@umc.edu", role = "cre"),
    person("Shaurita", "Hutchins", email = "shutchins2@umc.edu", role = "aut"))
Maintainer: Rob Gilmore <rgilmore@umc.edu>
License: MIT + file LICENSE
biocViews: Metagenomics, Microbiome, Sequencing, SystemsBiology
Description: An R package for microbiome analysis combining functions from phyloseq, metacodeR, 
    and microbiome into an easy to use and full featured microbiome analysis package.
Roxygen: list(markdown = TRUE)
Depends:
    R (>= 3.3.0),
    dplyr (== 0.7.8),
    microbiome (>= 1.5.27),
    R6 (== 2.3.0)
Remotes: 
    github::ropensci/taxa,
    github::grunwaldlab/metacoder,
    github::joey711/phyloseq,
    github::microbiome/microbiome,
    github::r-lib/covr
Imports:
    ape,
    DT,
    data.table,
    diptest,
    rlang,
    glue,
    metacoder,
    modes,
    openxlsx,
    phyloseq,
    plotly,
    purrr,
    scico,
    taxa,
    tibble,
    tidyr,
    viridis,
    yaml,
    ggplot2,
    stringr,
    rstudioapi,
    magrittr,
    ggpubr,
    ggthemes,
    crayon,
    biomformat,
    forcats,
    ggrepel,
    scales,
    vegan,
    leaflet,
    htmlwidgets,
    htmltools
Suggests:
    knitr,
    testthat,
    rmarkdown,
    covr
Additional_repositories:
    http://bioconductor.org/packages/release/bioc/,
    http://bioconductor.org/packages/release/data/annotation,
    http://bioconductor.org/packages/release/data/experiment,
    http://bioconductor.org/packages/release/extra
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.1
URL: https://github.com/vallenderlab/MicrobiomeR, https://microbiomer.vallenderlab.science/
BugReports: https://github.com/vallenderlab/MicrobiomeR/issues
VignetteBuilder: knitr

Travis CI Configuration file

# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r

language: R
sudo: false
warnings_are_errors: false
cache: packages
cran: http://cran.rstudio.com

branches:
  only:
  - master
  - dev-master
  - build-fixes
  - debug


env:
  global:
    - _R_CHECK_FORCE_SUGGESTS_=false
    - R_REMOTES_NO_ERRORS_FROM_WARNINGS=true

r:
- release
- devel
- oldrel

r_github_packages:
  - r-lib/covr
  - ropensci/taxa

after_success:
  - R CMD INSTALL $PKG_TARBALL
  - Rscript -e 'covr::codecov()'
#2

It is not generally possible to pin a specific version like you are doing in R packages. You can in general only specify a minimum acceptable version. However you can use

Remotes: cran/dplyr@0.7.8

To install that specific dplyr from the GitHub cran mirror if you wish.

2 Likes
#3

Thanks for that suggestion. I’ll give it a try.

This is the first time I’ve gotten deep into R package development so it’s great to learn that about specific versions of packages.

2 Likes
#4

This definitely worked thank you!