Skip to content

rig 0.12.0 alpha

Pre-release
Pre-release

Choose a tag to compare

@gaborcsardi gaborcsardi released this 24 Nov 11:35
· 13 commits to main since this release

New features

  • New rig audit command: it checks the packages of a project's lock file
    and library, or of an R library, for known vulnerabilities and for
    versions that the repository blocks. rig audit --fix upgrades them to
    the nearest version without known problems. It exits with status 1 if it
    finds problems, so it can be used in CI. rig pkg audit does the same
    for a package library, inside or outside a project. --exclude-newer
    limits the upgrades to versions published before a given date.

  • rig now reads a package repository according to its type (CRAN mirror,
    Posit Package Manager, Bioconductor, r-universe, etc.), detected from the
    server or set with type in rproj.toml or rig repos add --type. For
    CRAN mirrors rig reads the full history of CRAN, so older versions are
    available, too.

  • rig proj lock and rig pkg install now record the git commit of
    packages from r-universe repositories. If r-universe later replaces the
    package file, rig proj sync builds the package from git at the locked
    commit.

  • rig ppm has new subcommands to query a Posit Package Manager instance:
    repos, snapshots, sources, transactions and whoami. The new
    rig ppm pkg group has the commands about packages: list, info,
    history, vulns, downloads, and publish, which uploads
    a package to a local source. rig ppm builds and rig ppm build-log moved
    to rig ppm pkg builds and rig ppm pkg build-log; the old names still
    work. rig ppm url can now print repository URLs, for a snapshot and for
    Linux binaries, and rig ppm status also shows the statistics and feature
    flags of the instance.

  • rig now reads a Package Manager token from the PACKAGEMANAGER_TOKEN
    environment variable, for the instance in PACKAGEMANAGER_ADDRESS. It
    sends Package Manager tokens to the Package Manager API as bearer tokens.

Projects

  • R sessions in synced rig projects now read .Renviron.rig after
    ~/.Renviron. Put secrets that must not be committed into this file
    (#518).

  • rig proj import improvements. It now:

    • parses author names better, and rig proj export writes them back
      in the same form;
    • records the order of the DESCRIPTION fields in
      description-field-order in [tool.rig], and rig proj export
      writes the fields in the same order;
    • rewrites DESCRIPTION from the new rproj.toml, like
      rig proj export --force. Use --keep-description to leave
      DESCRIPTION unchanged;
    • adds rproj.toml, rproj.lock, .rvenv, .rvenvlib, .Renviron
      and .Renviron.rig to .Rbuildignore;
    • adds rproj.lock to .gitignore. A package is checked against many
      versions of its dependencies, so it should not commit a lock file.
  • rig proj renv import improvements. It now:

    • creates both rproj.toml and rproj.lock, and the lock file has the
      same package versions as renv.lock. Use --no-lock-versions to skip
      creating rproj.lock;
    • sets r-versions in rproj.toml to the R version of renv.lock;
    • imports repositories and detects their type;
    • warns about packages from unsupported sources;
    • imports packages that renv installed from GitHub, GitLab, Bitbucket
      or git as git dependencies.
  • rig proj export now writes exact version requirements as
    pkg (== 1.0.0) in DESCRIPTION, because R does not support a single
    =. It also writes strict bounds as > and <, not >> and <<.

  • In admin mode, when rig proj sync or rig run need to install R, they
    now run rig add in a separate process, and only that process runs with
    sudo (or as administrator on Windows). Before, the whole command ran
    again with sudo after the R installation, so the project library and
    the package cache were owned by root (#503).

  • rig proj sync no longer fails to install the project's own package.
    It copied the project's .rvenv directory too, while it was installing
    the dependencies there, and this sometimes failed.

Package installation

  • rig now retries package downloads that fail with a transient error, a
    broken connection, a timeout, or some 4xx and 5xx HTTP statuses.
    It tries each URL up to three times.

  • rig now respects servers that rate limit requests, e.g. the public Posit
    Package Manager at p3m.dev. If a server answers with 429 Too Many
    Requests, or with a Retry-After header, rig pauses all downloads from
    that server for the time in Retry-After and then tries again.

  • rig pkg install --no-install-self now only skips the local packages
    (paths) named on the command line. Before, it skipped every named
    package.

  • rig pkg install and rig proj sync now show why a package failed to
    install when the error happens outside of R CMD INSTALL, e.g. when the
    library is not writeable. Before, this error was only in the debug
    output (#504).

  • rig pkg install and rig proj lock now choose binary packages for
    the architecture of the R version, not rig's own. Before, an x86_64
    build of rig on aarch64 Windows installed x86_64 binaries into the
    library of an aarch64 R. rig pkg install and rig proj sync now also
    reinstall packages that were built for another architecture.

  • rig pkg doctor now reports packages built for another architecture
    on Windows too, e.g. x86_64 packages in the library of an aarch64 R.

R installations

  • rig now supports manylinux_2_28 R builds, which only need glibc 2.28,
    so rig now works on RHEL 8, Rocky Linux 8, Ubuntu 20.04, etc.
    (#402, #517).

  • In user mode on macOS, rig add now sets FONTCONFIG_FILE in R's
    etc/Renviron, so cairo graphics devices, e.g. svg(), work correctly.
    Reinstall R versions installed with an older rig to get the fix, e.g.
    with rig add --reinstall (#439, #524).

  • rig's code in the system Rprofile now only creates the user library
    if R_LIBS_USER is an absolute path. Before, it created a directory
    called 'NULL' on Windows during R CMD check, which sets
    R_LIBS_USER to 'NULL', with the quotes.

  • rig now creates .exe shims differently, without modifying the signed
    .exe files, to avoid interference with security software. Run
    rig system make-links to update the existing quick links, including
    the aliases and the default version, and rig proj sync in your
    projects to update their shims.

Certificates

  • In user mode on Linux and for portable installations in admin mode,
    SSL_CERT_FILE and CURL_CA_BUNDLE set in the shell now take precedence
    over the rig CA bundle in R's Renviron.site. Run
    rig system update-certs to fix R versions that are already installed
    (#501).

  • On Linux, rig now points portable R installations at the system CA
    bundle, e.g. /etc/ssl/certs/ca-certificates.crt, so R trusts the same
    certificates as the rest of the system. It only downloads the Mozilla
    bundle from curl.se if it cannot find a system bundle. Both rig add
    and rig system update-certs do this (#501).

  • rig system update-certs now also works in admin mode on Linux. It
    updates the portable R installations, and runs sudo if needed.

rig itself

  • rig now has nightly builds, published as the nightly GitHub release.
    Install them with rig self update --nightly.

  • rig self update now works on Windows on ARM.