From 36df1a17405f3cb5e1da44b9023aeac023fc9ecc Mon Sep 17 00:00:00 2001 From: Markus Neusinger <2921697+MarkusNeusinger@users.noreply.github.com> Date: Fri, 23 Oct 2026 15:52:56 +0200 Subject: [PATCH 1/2] fix(setup-r): install resolute binaries on the Ubuntu 26.04 runner GitHub's ubuntu-latest now resolves to Ubuntu 26.04 (resolute), but the setup-r action still pinned Posit Package Manager's noble (24.04) binaries. They install without error there; stringi then fails to load because its binary links libicuuc.so.74/libicui18n.so.74 and 26.04 ships ICU 78. The old smoke test loaded only ggplot2 and ragg, so it passed and hid the mismatch. - Switch the snapshot URL to __linux__/resolute/2026-10-20. The date stays, so the ggplot2 4.0.3 note and core/library_versions.py are unchanged. R itself needs no change: r-lib/actions/setup-r resolves 4.6.1 to Posit's ubuntu-2604 deb on its own. - The smoke test also loads tidyr and stringr and calls str_detect(), so a binary built for another Ubuntu release fails the setup step. - The test_version_sources fixture models the real line, so it now names resolute too. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0175hA62juZoajMcqKxWFGza --- .github/actions/setup-r/action.yml | 23 ++++++++++++++++------- changelog.d/setup-r-resolute.md | 12 ++++++++++++ tests/unit/core/test_version_sources.py | 2 +- 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 changelog.d/setup-r-resolute.md diff --git a/.github/actions/setup-r/action.yml b/.github/actions/setup-r/action.yml index 197ea928929..c4843e799cd 100644 --- a/.github/actions/setup-r/action.yml +++ b/.github/actions/setup-r/action.yml @@ -10,7 +10,7 @@ inputs: description: "R version to install" required: false # Bump together with the snapshot date below: Posit Package Manager serves - # noble binaries per R minor version, so a new R needs a snapshot that has them. + # resolute binaries per R minor version, so a new R needs a snapshot that has them. default: "4.6.1" runs: @@ -49,9 +49,13 @@ runs: # install.packages auto-resolves transitive dependencies that a hand-written # renv.lock used to miss (munsell, gtable, colorspace, R6, RColorBrewer, ...). # Pinning to a dated Posit Package Manager snapshot keeps versions - # reproducible without needing a fully-populated lockfile. The `noble` URL - # matches the current ubuntu-latest runner image — update if GitHub moves - # the runner OS, and bump the snapshot date deliberately. + # reproducible without needing a fully-populated lockfile. The `resolute` + # URL matches the ubuntu-latest runner image (Ubuntu 26.04 since October + # 2026). Change the codename whenever GitHub moves the runner OS: Posit + # builds each binary against one release's system libraries, and the + # former `noble` (24.04) binaries installed fine on 26.04 but stringi + # failed to load there (it links libicuuc.so.74; 26.04 ships ICU 78). + # Bump the snapshot date deliberately. # # Snapshot 2026-10-20 ships ggplot2 4.0.3. The repository has no R lock # file, so this line stands in for one: core/library_versions.py reads @@ -60,7 +64,7 @@ runs: # tests/unit/core/test_version_sources.py until this line names the ggplot2 # version the new snapshot installs (packageVersion("ggplot2") in a run). # - # Every package below installs from this snapshot as a noble binary for + # Every package below installs from this snapshot as a resolute binary for # R 4.6.1. ggplot2 4.0 changes rendering defaults; the changes that matter # to generated code are listed in prompts/library/ggplot2.md. # @@ -73,7 +77,7 @@ runs: run: | Rscript -e ' options( - repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/noble/2026-10-20"), + repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/resolute/2026-10-20"), Ncpus = parallel::detectCores() ) install.packages( @@ -85,10 +89,15 @@ runs: ' - name: Smoke-test ggplot2 renders a PNG + # Loading tidyr and stringr also loads stringi, whose binary links the + # distro ICU by soname; str_detect() then calls into it. A Posit binary + # built for another Ubuntu release installs without error and fails only + # here, at load time, instead of in the middle of a generation run. shell: bash run: | Rscript -e ' - library(ggplot2); library(ragg) + library(ggplot2); library(ragg); library(tidyr); library(stringr) + stopifnot(str_detect("anyplot", "plot")) tmp <- tempfile(fileext = ".png") ggsave(tmp, ggplot(mtcars, aes(wt, mpg)) + geom_point(), device = ragg::agg_png, width = 4, height = 3, dpi = 100) diff --git a/changelog.d/setup-r-resolute.md b/changelog.d/setup-r-resolute.md new file mode 100644 index 00000000000..69f4a217d11 --- /dev/null +++ b/changelog.d/setup-r-resolute.md @@ -0,0 +1,12 @@ +### Fixed + +- **The R setup installs packages built for the Ubuntu 26.04 runner image.** The + setup-r action installed Posit's `noble` (Ubuntu 24.04) binaries. On the 26.04 + image they install without error, but stringi links ICU 74 while 26.04 ships + ICU 78, so loading stringr fails. No catalogue implementation reaches stringi + today: all 325 render the same on both builds. A generated implementation that + used stringr, or tidyr's `separate()` or `extract()`, would have failed + mid-run. The action now installs the `resolute` binaries from the same + 2026-10-20 snapshot. Its smoke test also loads tidyr and stringr, so a binary + built for another Ubuntu release fails the setup step instead of a generation + run. diff --git a/tests/unit/core/test_version_sources.py b/tests/unit/core/test_version_sources.py index defe11a93c5..51c59b07d6f 100644 --- a/tests/unit/core/test_version_sources.py +++ b/tests/unit/core/test_version_sources.py @@ -135,7 +135,7 @@ def test_uv_lock_with_a_duplicated_block_does_not_resolve(tmp_path: Path) -> Non SETUP_R = """ # Snapshot {note} ships ggplot2 3.5.1. The repository has no R lock file. run: | - Rscript -e 'options(repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/noble/{url}"))' + Rscript -e 'options(repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/resolute/{url}"))' """ From 530d059c48142b1cb7f8b56ab96457c0bd970bd3 Mon Sep 17 00:00:00 2001 From: Markus Neusinger <2921697+MarkusNeusinger@users.noreply.github.com> Date: Fri, 23 Oct 2026 15:55:57 +0200 Subject: [PATCH 2/2] docs(changelog): reference #12263 in the setup-r fragment Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0175hA62juZoajMcqKxWFGza --- changelog.d/setup-r-resolute.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/setup-r-resolute.md b/changelog.d/setup-r-resolute.md index 69f4a217d11..f7c2c7283e3 100644 --- a/changelog.d/setup-r-resolute.md +++ b/changelog.d/setup-r-resolute.md @@ -9,4 +9,4 @@ mid-run. The action now installs the `resolute` binaries from the same 2026-10-20 snapshot. Its smoke test also loads tidyr and stringr, so a binary built for another Ubuntu release fails the setup step instead of a generation - run. + run. (#12263)