Skip to content

Update book for R 4.6.0#624

Merged
d-morrison merged 11 commits intomainfrom
copilot/update-book-for-r-4-6-0
Apr 27, 2026
Merged

Update book for R 4.6.0#624
d-morrison merged 11 commits intomainfrom
copilot/update-book-for-r-4-6-0

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 27, 2026

  • Update R version in renv.lock from 4.5.2 to 4.6.0
  • Update Matrix package version in renv.lock from 1.7-4 to 1.7-5 (new recommended package version shipped with R 4.6.0)
  • Update year reference in intro-to-R.qmd (2025 → 2026) to reflect current year
  • Fix spurious "R": {"Version": "4.6.0"} entry that was added into the Packages section by renv::record() — this caused renv::restore() to fail with "argument is of length zero" in renv_record_source_normalize
  • Bump TMB 1.9.19 → 1.9.21 (2026-03-23) — version 1.9.19 fails to compile under R 4.6.0 / Matrix 1.7-5; 1.9.21 is the current CRAN release with the fix
  • Bump lazyeval 0.2.2 → 0.2.3 (2026-04-04) — version 0.2.2 fails under R 4.6.0 with "undefined symbol: PREXPR"; 0.2.3 is the current CRAN release with the fix
  • Bump base64enc 0.1-3 → 0.1-6 (2026-02-02) — version 0.1-3 fails under R 4.6.0 with "undefined symbol: SETLENGTH"; 0.1-6 is the current CRAN release with the fix
  • Bump S7 0.2.1 → 0.2.2 (2026-04-22) — version 0.2.1 fails to compile under R 4.6.0 with "R_NamespaceRegistry undeclared"; 0.2.2 is the current CRAN release with the fix
  • Switch cpp11 from GitHub dev version 0.5.2.9000 to CRAN 0.5.4 (2026-04-04) — the dev version's headers still used R_NamespaceRegistry (removed in R 4.6.0), causing all packages that compile with cpp11 headers (isoband, tidyr, vroom, timechange, igraph, systemfonts, etc.) to fail; 0.5.4 removes this non-API usage and eliminates the GitHub authentication dependency for this package
  • Bump magrittr 2.0.4 → 2.0.5 (2026-04-04) — compiled C package broken under R 4.6.0 (released same day as lazyeval/cpp11 R 4.6.0 fixes); caused latex2exp to fail with "magrittr not available" during renv's second-pass install
  • Bump forecast 8.24.0 → 9.0.2 (2026-03-18) — version 8.x had tseries in Imports, which triggered a renv parallel-install race condition where forecast was started before tseries finished; version 9.x removes tseries from Imports entirely
  • Bump gt 1.2.0 → 1.3.0 (2026-01-22) — version 1.2.0 segfaults during byte-compile under R 4.6.0 (vctbl_restore crash in dplyr::tribble); 1.3.0 is the current CRAN release with the fix
  • Bump textshaping 1.0.4 → 1.0.5 (2026-03-06) — compiled package using cpp11 headers; 1.0.5 aligns with cpp11 0.5.4
  • Bump tseries 0.10-58 → 0.10-61 (2026-03-26) — three releases since 0.10-58; compiled package with likely R 4.6.0 compatibility fixes
  • Bump latex2exp 0.9.6 → 0.9.8 (2026-01-09) — version 0.9.6 had stringr and magrittr in Imports, triggering a renv parallel-install race where latex2exp was attempted before those dependencies finished building; version 0.9.8 has no Imports at all, eliminating the race
  • Bump ragg 1.5.0 → 1.5.2 (2026-03-23) — current CRAN release
  • Add libharfbuzz-dev libfribidi-dev libfreetype6-dev libtiff5-dev libwebp-dev to CI workflow system dependencies — libharfbuzz-dev and libfribidi-dev are required by textshaping; libfreetype6-dev, libtiff5-dev, and libwebp-dev are required by ragg to build from source; all three renv-restore/render workflows (preview.yml, publish.yml, lint-changed-files.yaml) now install the same system dependency set

Copilot AI requested review from Copilot and removed request for Copilot April 27, 2026 07:11
Copilot AI linked an issue Apr 27, 2026 that may be closed by this pull request
Copilot AI requested review from Copilot and removed request for Copilot April 27, 2026 07:21
Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/2b1a1beb-8bd2-4c69-a228-d513b40f042e

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot April 27, 2026 07:23
Copilot AI changed the title [WIP] Update book for R 4.6.0 Update book for R 4.6.0 Apr 27, 2026
Copilot AI requested a review from d-morrison April 27, 2026 07:24
@d-morrison
Copy link
Copy Markdown
Owner

@d-morrison d-morrison removed their request for review April 27, 2026 07:27
Copilot AI requested review from Copilot and removed request for Copilot April 27, 2026 07:32
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 27, 2026

@copilot fix https://github.com/d-morrison/rme/actions/runs/24981940387/job/73145975002?pr=624

Fixed in commit 1e518d9. The renv::record() call had added a spurious "R": {"Version": "4.6.0"} entry into the Packages section of renv.lock. That entry had no Source field, causing renv_record_source_normalize to fail with "argument is of length zero" during renv::restore(). The bad entry has been removed — the R version is already correctly recorded in the top-level "R" section.

Copilot AI requested a review from d-morrison April 27, 2026 07:32
@d-morrison
Copy link
Copy Markdown
Owner

Copilot AI requested review from Copilot and removed request for Copilot April 27, 2026 07:45
Copilot AI requested a review from d-morrison April 27, 2026 09:18
Copy link
Copy Markdown
Owner

@d-morrison d-morrison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preview still fails

…ries for R 4.6.0

Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/3f336cde-d27a-4dac-bbbd-cc3c8680a5b1

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot April 27, 2026 16:15
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 27, 2026

preview still fails

Fixed in commit 5a7d6ca. Four root causes identified in the previous failure:

  1. magrittr 2.0.4 → 2.0.5 — compiled C package broken under R 4.6.0 (released same day as lazyeval/cpp11 fixes, 2026-04-04). Caused latex2exp to fail with "magrittr not available" during the second-pass install.

  2. forecast 8.24.0 → 9.0.2 — v8 had tseries in Imports, which triggered a renv parallel-install race condition (forecast and tseries landed in the same install batch). v9 removes tseries from Imports entirely.

  3. gt 1.2.0 → 1.3.0 — v1.2.0 segfaults during byte-compile under R 4.6.0 (vctbl_restore crash in dplyr::tribble).

  4. libharfbuzz-dev libfribidi-dev added to preview workflow system deps (+ bump textshaping 1.0.4 → 1.0.5, tseries 0.10-58 → 0.10-61) — textshaping needs these libraries to build from source; they were missing from the workflow's apt-get step.

Copilot AI requested a review from d-morrison April 27, 2026 16:18
@d-morrison
Copy link
Copy Markdown
Owner

@d-morrison
Copy link
Copy Markdown
Owner

@d-morrison d-morrison removed their request for review April 27, 2026 16:50
…iff/libwebp/libfreetype sys-deps

Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/05dc7c20-704c-4a6e-a6b2-17e03f110c3e

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot April 27, 2026 17:03
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 27, 2026

@copilot still broken: https://github.com/d-morrison/rme/actions/runs/25006458250/job/73230453761?pr=624

Fixed in commit 2940dfa. Two root causes in this failure:

  1. latex2exp 0.9.6 → 0.9.8 — v0.9.6 had stringr and magrittr in Imports, causing a renv parallel-install race where latex2exp was attempted before those dependencies finished building. v0.9.8 has no Imports at all.

  2. ragg 1.5.0 → 1.5.2 + added libfreetype6-dev libtiff5-dev libwebp-dev to workflow system deps — ragg needs freetype2, libtiff-4, and libwebp headers to build from source; those were missing from the apt-get step.

Copilot AI requested a review from d-morrison April 27, 2026 17:05
Copilot AI review requested due to automatic review settings April 27, 2026 17:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

Comment on lines 53 to +55
# `libglpk-dev` is required for the igraph/ggdag/ggraph dependency stack.
# Keep this dependency aligned with other workflows that restore/render the same renv set.
sudo apt-get install -y jags libcurl4-openssl-dev libpng-dev libfontconfig1-dev libjpeg-dev libglpk-dev
sudo apt-get install -y jags libcurl4-openssl-dev libpng-dev libfontconfig1-dev libjpeg-dev libglpk-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libtiff5-dev libwebp-dev
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The preview workflow now installs additional system libraries (harfbuzz/fribidi/freetype/tiff/webp), but the file’s own comment says to keep this dependency list aligned with other workflows that restore/render the same renv set. Currently, publish.yml and lint-changed-files.yaml install a different set, which can lead to CI failures when packages like textshaping/ragg compile from source (especially on new R versions). Consider extracting a shared list (or updating the other workflows) so all renv restore/render jobs install the same system deps.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 9e84868. Updated publish.yml and lint-changed-files.yaml to match the full system dependency list from preview.yml — all three workflows now install the same set: jags libcurl4-openssl-dev libpng-dev libfontconfig1-dev libjpeg-dev libglpk-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libtiff5-dev libwebp-dev.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.

2026-04-27 20:42 UTC

@d-morrison d-morrison merged commit ca6e139 into main Apr 27, 2026
3 checks passed
@d-morrison d-morrison deleted the copilot/update-book-for-r-4-6-0 branch April 27, 2026 20:33
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.

update book for R 4.6.0

3 participants