Check package version number history for compliance.
Value
A named list of information about packages which do not comply with version number history checks. Each name is a package name, and each element contains specific information about version non-compliance: the current version number, the current version hash, and the analogous versions and hashes of the highest-versioned release recorded.
Details
This function checks the version number history of packages in R-multiverse and reports any packages with issues. The current released version of a given package must be unique, and it must be greater than all the versions of all the previous package releases.
Package issues
Functions like issues_versions()
and issues_descriptions()
perform health checks for all packages in R-multiverse.
For a complete list of checks, see
the issues_*()
functions listed at
https://r-multiverse.org/multiverse.internals/reference/index.html.
record_versions()
updates the version number history
of releases in R-multiverse, and record_issues()
gathers
together all the issues about R-multiverse packages.
See also
Other issues:
issues_checks()
,
issues_dependencies()
,
issues_descriptions()
Examples
lines <- c(
"[",
" {",
" \"package\": \"package_unmodified\",",
" \"version_current\": \"1.0.0\",",
" \"hash_current\": \"hash_1.0.0\",",
" \"version_highest\": \"1.0.0\",",
" \"hash_highest\": \"hash_1.0.0\"",
" },",
" {",
" \"package\": \"version_decremented\",",
" \"version_current\": \"0.0.1\",",
" \"hash_current\": \"hash_0.0.1\",",
" \"version_highest\": \"1.0.0\",",
" \"hash_highest\": \"hash_1.0.0\"",
" },",
" {",
" \"package\": \"version_incremented\",",
" \"version_current\": \"2.0.0\",",
" \"hash_current\": \"hash_2.0.0\",",
" \"version_highest\": \"2.0.0\",",
" \"hash_highest\": \"hash_2.0.0\"",
" },",
" {",
" \"package\": \"version_unmodified\",",
" \"version_current\": \"1.0.0\",",
" \"hash_current\": \"hash_1.0.0-modified\",",
" \"version_highest\": \"1.0.0\",",
" \"hash_highest\": \"hash_1.0.0\"",
" }",
"]"
)
versions <- tempfile()
writeLines(lines, versions)
out <- issues_versions(versions)
str(out)
#> List of 2
#> $ version_decremented:List of 4
#> ..$ version_current: chr "0.0.1"
#> ..$ hash_current : chr "hash_0.0.1"
#> ..$ version_highest: chr "1.0.0"
#> ..$ hash_highest : chr "hash_1.0.0"
#> $ version_unmodified :List of 4
#> ..$ version_current: chr "1.0.0"
#> ..$ hash_current : chr "hash_1.0.0-modified"
#> ..$ version_highest: chr "1.0.0"
#> ..$ hash_highest : chr "hash_1.0.0"