env_manifest.RdSerialises the installation qualification record to JSON: every package with
its version, source, repository URL and DESCRIPTION checksum, plus the R
version, platform and OS the record was taken on. Hand this file to a
colleague and they can prove — package by package — whether their
environment matches yours.
Library paths to scan.
Character vector of package names, or NULL (default) for the
whole library.
An existing iq_record() to serialise instead of taking a fresh
scan. Optional.
A valpack_manifest object.
Ignored.
A length-1 character vector of JSON, with class valpack_manifest.
Write it with writeLines().
This deliberately does not depend on renv: the manifest is read off the installed library, so it describes what is there, not what a lockfile says should be there.
The manifest carries packages_with_installed_tests, the count of packages
installed with --install-tests, alongside the per-package installed_tests
flag. That number bounds every operational qualification taken against this
library: where it is 0, no test suite can be run and an OQ can only qualify
examples. It is recorded at the top level so two sites can compare it without
scanning the package array.
json <- env_manifest(pkgs = c("tibble", "jsonlite"))
json
#>
#> ── valpack environment manifest ────────────────────────────────────────────────
#> ℹ R version 4.5.2 (2025-10-31) | x86_64-pc-linux-gnu | Linux 7.0.0-14-generic
#> ℹ 2 packages | 1168 bytes of JSON
#> ℹ Generated 2026-08-03 04:47:37 UTC by valpack 0.0.0.9002
str(jsonlite::fromJSON(json)$packages)
#> 'data.frame': 2 obs. of 10 variables:
#> $ package : chr "tibble" "jsonlite"
#> $ version : chr "3.3.1" "2.0.0"
#> $ library : chr "/usr/local/lib/R/site-library" "/usr/local/lib/R/site-library"
#> $ built_r : chr "4.5.2" "4.5.2"
#> $ source : chr "CRAN" "CRAN"
#> $ repository : chr "https://cloud.r-project.org" "https://cloud.r-project.org"
#> $ description_md5 : chr "95d08b59dd40a60f90d095c058b4ccce" "281ddbf8581f58912555190835dd5331"
#> $ priority : logi NA NA
#> $ needs_compilation: chr "yes" "yes"
#> $ installed_tests : logi FALSE FALSE