Skip to content

ci: Survive an archived CRAN package, cache revdep compiles - #64

Open
krlmlr wants to merge 1 commit into
mainfrom
claude/cran-package-repos-setup-oygwom
Open

krlmlr wants to merge 1 commit into
mainfrom
claude/cran-package-repos-setup-oygwom

Conversation

@krlmlr

@krlmlr krlmlr commented Sep 13, 2026

Copy link
Copy Markdown
Member

Brings this repository's workflow kit up to the state the rest of the fleet already carries on main. The commit was sitting on a branch here with no pull request to represent it.

Independent of the documentation chain (#59#60#62#61#63): it targets main directly and touches only .github/.

What changes

  • install/action.yml gains handling for a dependency that has been archived on CRAN, so a revdep run no longer fails outright when one of them disappears.
  • revdep4/queue.sh and revdepx/check-half.sh cache compiled reverse dependencies, which is the bulk of the wall clock in those runs.
  • get-website/action.yml is added, matching the sibling repositories.
  • One documentation line in revdep4/README.md follows the queue change.

No package code, no documentation, no rendered output.

Why it is worth taking on its own

The revdep workflows in this repository will hit the archived-package case the same way the others did. Nothing else in the documentation chain touches these files, so this can land in either order without conflicting.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m


Generated by Claude Code

Syncs the CI kit from cynkratemplate: cynkra/cynkratemplate#112 and cynkra/cynkratemplate#113, both merged. Every file here is byte-identical to the template, and the same changes are already on `main` in the 19 packages that take the kit directly.

### An archived CRAN package must not fail the dependency solve

`needs: website` reaches pak as a dependency *type* (`lockfile_create(dependencies = "Config/Needs/website")`), and a dependency type resolves all-or-nothing: one entry that no repository carries fails the whole solve, before a single check runs. That is what happened in r-dbi/DBI when CRAN archived `adbi` and `RPresto` on 2026-09-11 — every check run died in the smoke test. No pak parameter reaches inside a dependency type: `?ignore-unavailable` is honoured for soft dependencies only, and `pkg=?ignore` drops the package even when it is available. So the new `get-website` action resolves the field itself and hands pak refs instead — an `owner/repo` entry stays as it is and stays strict, a plain name the configured repositories carry is kept, and the rest is dropped with a warning in the job log. Nothing leaves `DESCRIPTION`, so a package that returns to CRAN is picked up again by the next run.

### Install an archived dependency from where it still lives

`R CMD check` reads `Additional_repositories` to confirm a dependency outside CRAN and Bioconductor is obtainable, but it never installs from it, and neither does pak, which reads `repos` alone. The new step installs a dependency only when it is still missing after the pak solve *and* no configured repository carries it at all, so anything CRAN still has stays with CRAN and a released dependency is never swapped for an r-universe development snapshot. Best effort by design: a failure leaves the check running with one fewer optional dependency, exactly as `=?ignore-build-errors` does in `Config/gha/extra-packages`.

### A shard-wide ccache for the revdep checks

Carried into the kit from duckdb/duckdb-r#2691, where it is already running. `revdep4/queue.sh` keeps one ccache directory for the whole shard, and `revdepx/check-half.sh` mounts it into every check container with `/usr/lib/ccache` on the container's `PATH`. The two halves of a revdep compile the same sources minutes apart — only the package under test in `lib-half` differs — and both halves see identical paths inside the container, so the second half hits on everything that does not depend on the package under test, and misses on exactly the objects whose headers really do differ, because what ccache hashes is the preprocessed source. The comparison the two halves exist to make is not weakened; it just stops paying twice for the parts that were never different. `REVDEPX_CCACHE_DIR=` empty turns it off. These workflows run on a schedule and on dispatch, so this part is not exercised by this PR's own checks.

### Effect here

None today. `Config/Needs/website` in this package holds only the `tidyverse/tidytemplate` entry, which stays strict either way, and there is no `Additional_repositories` field. The first two changes are insurance for the day CRAN archives something that lands in either place.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hcbd7RdNjqre33JRgc86j8
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.

2 participants