[R-pkg-devel] pkg built with static vignette introduces dependency on R > = 3.5.0

Roman Flury rom@n@flury @ending from m@th@uzh@ch
Fri Jun 8 11:12:31 CEST 2018


Dear all,

I'm working on a package which contains a static vignette. If the pkg is built with R version 3.3.3 everything works fine, but if built with the current R-devel version I get the warning:

>     NB: this package now depends on R (>= 3.5.0)
>     WARNING: Added dependency on R >= 3.5.0 because serialized objects in  serialize/load version 3 cannot be read in older versions of R.  File(s) containing such objects:  'staticvignettepkg/build/vignette.rds'

and as described the dependency on R >= 3.5.0 is added to the DESCRIPTION file.

I found possible context for this behaviour in the R-devel NEWS https://cran.r-project.org/doc/manuals/r-devel/NEWS.html:

''R has new serialization format (version 3) which supports custom serialization of ALTREP framework objects. These objects can still be serialized in format 2, but less efficiently. Serialization format 3 also records the current native encoding of unflagged strings and converts them when de-serialized in R running under different native encoding. Format 3 comes with new serialization magic numbers (RDA3, RDB3, RDX3). Format 3 can be selected by version = 3 in save(), serialize() and saveRDS(), but format 2 remains the default for all serialization and saving of the workspace. Serialized data in format 3 cannot be read by versions of R prior to version 3.5.0.''

but I can not see why or how this should have an influence on a static vignette?

To illustrate and reproduce my issue I created a git repository https://github.com/romanflury/staticvignette with a minimal package, containing an arbitrary pdf document as a static vignette. The git repository includes the respective session infos also.

I hope to avoid this dependency, since I do not want to force users to update their R version.

Many thanks,

Roman



More information about the R-package-devel mailing list