Skip to contents

Record R-multiverse package issues in package-specific JSON files.

Usage

record_issues(
  repo = "https://community.r-multiverse.org",
  versions = "versions.json",
  output = "issues",
  mock = NULL,
  verbose = FALSE
)

Arguments

repo

Character of length 1, URL of the package repository. R-multiverse uses "https://community.r-multiverse.org".

versions

Character of length 1, file path to a JSON manifest tracking the history of released versions of packages. The official versions file for R-multiverse is maintained and updated periodically at https://github.com/r-multiverse/checks/blob/main/versions.json.

output

Character of length 1, file path to the folder to record new package issues. Each call to record_issues() overwrites the contents of the repo.

mock

For testing purposes only, a named list of data frames for inputs to various intermediate functions.

verbose

TRUE to print progress while checking issues with dependencies, FALSE otherwise.

Value

NULL (invisibly).

Package issues

Functions like issues_versions() and issues_descriptions() perform health checks for all packages in R-multiverse. Only packages that pass these checks go to the production repository at https://production.r-multiverse.org. For a complete list of checks, see the issues_*() functions listed at https://r-multiverse.org/multiverse.internals/reference.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.

Issue files

For each package with observed problems, record_issues() writes an issue file. This issue file is a JSON list with one element per type of failing check. Each element has an informative name (for example, checks, descriptions, or versions) and a list of diagnostic information.

Each issue file also has a date field. This date the day that an issue was first noticed. It automatically resets the next time all package are resolved.

Examples

  repo <- "https://wlandau.r-universe.dev"
  output <- tempfile()
  versions <- tempfile()
  record_versions(
    versions = versions,
    repo = repo
  )
  record_issues(
    repo = repo,
    versions = versions,
    output = output
  )
  files <- list.files(output)
  print(files)
#> character(0)
  package <- head(files, n = 1)
  if (length(package)) {
    print(package)
  }
  if (length(package)) {
    print(readLines(file.path(output, package)))
  }