Skip to content

[Bioc-devel] R version dependence of a new package

6 messages · Shepherd, Lori, Yaoyong Li, Stephanie M. Gogarten +2 more

#
Hello,

may I ask a question about the R version dependence?

Currently I am trying to submit a package to Bioconductor repository. When
my package was built at bioconductor.org, I got a warning message

"* WARNING: Update R version dependency from 2.3.0 to 3.4."

So I changed the R dependency to 3.4 in my DESCRIPTION file, and
consequently the warning message disappeared. However, as one result of the
change, my package cannot be loaded and run in R whose version is earlier
than 3.4. On the other hand, my package actually doesn't need the R version
installed in my computer. S my question is why the package builder at
bioconductor.org wanted my package to update the R version to 3.4.

Best regards,

Yaoyong
#
We strongly recommend the version of R that is used on our builders when building and checking your package.  This is also to ensure that the package dependencies are also in a version that is compatible with a new package.  We can't guarantee that a package will work with a previous version of a dependency so the best practice is to use the current version of R as we check against the most recent and current versions of packages for the version of R and Bioconductor.  This is also why we have biocValid and biocLite to make sure packages are up-to-date and valid for a particular version of R and Bioconductor.  Package can change over time and cause compatibility issues that are unforseen; R also can change from version to version and cause unforseen problems.


Lori Shepherd

Bioconductor Core Team

Roswell Park Cancer Institute

Department of Biostatistics & Bioinformatics

Elm & Carlton Streets

Buffalo, New York 14263
2 days later
#
Dear Lori,

many thanks for your detailed explanations. I think that it makes sense
from Bioconductor maintenance's point of view to require that the R version
of a package should be the same of the R version in a Bioconductor release
which includes the package, because it's the safest option. On the other
hand, I still think that this requirement put some unnecessary limit on the
scope of the R version which a package can be used with. For example, as
the package creator I know that my package can work with R from 2.3.0 and
upward, including the version 3.4 that the current Bioconductor used, then
why should I have to restrict the R version to 3.4 and upward. I guess that
it's the package creator's responsibility to determine which R version(s)
their packages depend on? It seems to me that there is a R version problem
between the package and the Biocondonctor only when the R versions that a
package specifies does not include the R version of a Bioconductor release
which the package is supposed to be included in.

I think that it probably makes no much difference in practice between what
I think it should be and the current practice in Bioconductor, as one can
easily upgrade the R to the latest version with no cost. But I hope you can
see the difference in theory.

Best regards,

Yaoyong

On Fri, Oct 20, 2017 at 1:02 PM, Shepherd, Lori <
Lori.Shepherd at roswellpark.org> wrote:

            

  
  
1 day later
#
Dear Yaoyong,

Can you remove the R version dependency from your DESCRIPTION file 
entirely? That will eliminate the warning, but will also not suggest to 
users that they need a newer version of R than is necessary. R 2.3.0 was 
released in 2006, so it seems highly unlikely that anyone would be 
currently trying to use an R version older than that.

Lori's answer seems to be more about the R version you should be using 
to test your package, which should indeed be current, but that is 
different than the minimum R version required to run the package at all. 
I know Bioconductor encourages users to stay up-to-date with R versions 
and does not guarantee that older versions will work with all packages, 
but I think there is still some utility in letting users know which 
packages depend on recent versions of R, and which packages can be 
expected to work with older versions.

Stephanie
On 10/23/17 4:36 AM, Yaoyong Li wrote:
1 day later
#
I lean to agree with Yaoyong, because I find it helpful to specify (or read):

Depends: R (>= 3.0.0)

which sends a message that "the code is relying on features in R that
was not available prior to R 3.0.0".  Also, if that's the only
dependency you have, then if it passed R CMD check on R 3.0.0 in the
past, it will keep doing so in the future.  On the other hand, if the
package depends on other packages, which it's likely to do, then that
"R (>= 3.0.0)" sends a message about what the lower bound is - it does
not necessarily guarantee that it will work with R 3.0.0.  I think
that is a valid specification (for R and packages) because otherwise,
what is the "(>= x.y.z)" specification meant to be used for otherwise?

The alternative is to, as Stephanie proposes, to not specify "R (>=
x.y.z)" or just "R", which is an unfortunate workaround.

Somewhat related to this, couldn't there be a place-holder R package
called 'Bioconductor' whose version corresponds to the Bioconductor
release/devel version?  Then a package could specify "Imports:
Bioconductor (>= 3.6)" to clarify/specify that the package "depends
on/is for" a particular version of the Bioconductor.  The Bioconductor
3.6 package could in turn specify "R (>= 3.4.0)".  BTW, unfortunately,
R does not support specify a lower and an upper range, e.g. neither "R
(>= 3.4.0 & < 3.5.0)" nor "R (>= 3.4.0), R (< 3.5.0)" is accepted
which also means it's not possible to depend on "Bioconductor (==
3.6.*)".

Henrik
On Tue, Oct 24, 2017 at 10:27 AM, Stephanie M. Gogarten <sdmorris at uw.edu> wrote:
#
On 10/25/2017 11:18 AM, Henrik Bengtsson wrote:
My feeling is that people are very unlikely to do this. Or they'll
forget to bump that version requirement at each release. Also the
version of this place-holder package wouldn't follow the convention
that the middle number in its version is even in release and odd
in devel so would require special treatment when we bump versions
the days before the release.

Note that people can already do something similar by importing the
BiocInstaller package and requiring at least the current version.
Unfortunately the version number of BiocInstaller doesn't reflect
the BioC version it belongs too. That could be changed though e.g.
have the first 2 digits in x.y.z reflect the BioC version. But
again, that means it wouldn't follow the convention etc...

H.