Skip to content

Bump vctrs/rlang pins to fix CI compile failure - #151

Merged
jt14den merged 3 commits into
LibraryCarpentry:mainfrom
jt14den:fix/renv-vctrs-rlang-pin
Aug 23, 2026
Merged

jt14den merged 3 commits into
LibraryCarpentry:mainfrom
jt14den:fix/renv-vctrs-rlang-pin

Conversation

@jt14den

@jt14den jt14den commented Aug 22, 2026

Copy link
Copy Markdown
Member

Closes #150.

Problem

CI was failing while restoring the renv cache, with compilation errors in vctrs and S7:

rlang/env.c:10:18: error: 'R_NamespaceRegistry' undeclared (first use in this function)
ERROR: compilation failed for package 'vctrs'

Root cause: vctrs 0.7.2 and S7 0.2.1 (pinned in renv/profiles/lesson-requirements/renv.lock) vendor a copy of rlang's C internals that reference R_NamespaceRegistry, a symbol R no longer exposes publicly as of 4.4+. Posit Package Manager only serves a prebuilt linux binary for the current CRAN release of each package, so these older pins fall back to a source compile that fails against the runner's R version.

Fix

Scanned the lockfile for every NeedsCompilation: yes / CRAN-sourced package with no current-version PPM binary, and bumped all of them (not just vctrs/S7) to their current CRAN release, to avoid hitting this same failure mode piecemeal across future CI runs: bit64, cli, curl, data.table, fs, glue, openssl, processx, ps, purrr, readxl, rlang, S7, stringi, vctrs, xfun, xml2.

Each entry's metadata was regenerated from the real DESCRIPTION file for that version (not hand-typed), so the diff matches what renv::snapshot() would produce.

Confirmed this failure pre-dates and is unrelated to #149 — same error hits 01 Maintain: Build and Deploy Site on main on 2026-08-11 and 2026-08-18.

…nux binary for the current runner and fails

compiling from source (vendored rlang code references R_NamespaceRegistry,
which R no longer exposes publicly).
@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Thank you!

Thank you for your pull request 😃

🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

  • 🎯 correct output
  • 🖼️ correct figures
  • ❓ new warnings
  • ‼️ new errors

Rendered Changes

🔍 Inspect the changes: https://github.com/LibraryCarpentry/lc-r/compare/md-outputs..md-outputs-PR-151

The following changes were observed in the rendered markdown documents:

 01-intro-to-r.md                                   |   10 +-
 02-starting-with-data.md                           |    2 +-
 03-data-cleaning-and-transformation.md             |    2 +-
 04-data-viz-ggplot.md                              |    2 +-
 config.yaml (gone)                                 |   86 -
 ...t-rendered-boxplot-exercise-subcollection-1.png |  Bin 49562 -> 48861 bytes
 ...a-viz-ggplot-rendered-boxplot-with-points-1.png |  Bin 42909 -> 43064 bytes
 ...data-viz-ggplot-rendered-unnamed-chunk-14-1.png |  Bin 39625 -> 39506 bytes
 fig/04-data-viz-ggplot-rendered-violin-plot-1.png  |  Bin 38570 -> 38735 bytes
 ...oducible-reports-rendered-plot-high-usage-1.png |  Bin 46952 -> 46795 bytes
 md5sum.txt                                         |   32 +-
 renv.lock (gone)                                   | 3962 --------------------
 12 files changed, 24 insertions(+), 4072 deletions(-)
What does this mean?

If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible.

This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

⏱️ Updated at 2026-08-22 23:32:18 +0000

vctrs 0.7.2 and S7 0.2.1 fail to compile against R 4.4+ because their
vendored rlang C code references R_NamespaceRegistry, which R no longer
exposes publicly (fixes LibraryCarpentry#150). Posit Package Manager only serves a
prebuilt linux binary for the current CRAN release of each package, so
any other compiled package pinned below its current version falls back
to a source build that may hit the same or similar failures.

Scanned the lockfile for every NeedsCompilation: yes / CRAN-sourced
package with no current-version PPM binary and bumped all of them to
their current CRAN release: bit64, cli, curl, data.table, fs, glue,
openssl, processx, ps, purrr, readxl, rlang, S7, stringi, vctrs, xfun,
xml2.
readxl 1.5.0 requires cpp11 >= 0.5.5; the lockfile still pinned 0.5.4,
which renv's pre-flight validation now rejects. Scanned the rest of the
lockfile for the same class of problem (a pinned version failing
another package's Depends/Imports/LinkingTo floor) and found none.
@jt14den
jt14den merged commit f01d631 into LibraryCarpentry:main Aug 23, 2026
5 checks passed
@jt14den
jt14den deleted the fix/renv-vctrs-rlang-pin branch August 23, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

R 4.4.0+ Compatibility: renv packages failing to compile due to R_NamespaceRegistry removal

1 participant