Skip to content

Add workflow for checking rstan and/or StanHeaders reverse-dependency status#1190

Open
andrjohns wants to merge 7 commits into
developfrom
revdeps-checking
Open

Add workflow for checking rstan and/or StanHeaders reverse-dependency status#1190
andrjohns wants to merge 7 commits into
developfrom
revdeps-checking

Conversation

@andrjohns

@andrjohns andrjohns commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary:

In order to make the process of getting new rstan up on CRAN a bit easier, I've put together an actions workflow for running the full reverse-dependency checks. Once all reverse-dependencies are consistently passing, it would be great to also include as an (infrequently) scheduled CI.

It operates in three stages:

  1. The full dependency tree for all reverse-dependencies is built/downloaded, and then cached and reused in the subsequent steps
    a. Pre-built binary packages are used for almost all dependencies (~10 need to be built)

  2. The list of reverse dependencies is split into batches of a specified size and batches are checked in parallel
    a. The number of dependencies to check per batch defaults to 10, but can be set when triggering workflow
    b. The maximum number of batches running in parallel is limited to 5 by default, but can also be configured

  3. The results of all checks are collated and a summary generated

The job can be set to check either rstan (implying also development StanHeaders) or just StanHeaders (implying CRAN rstan).

The reverse-dependency summary is reported in the action summary itself, and all check/install logs are attached as artifacts. You can see current runs here:

Using the defaults (10 packages per batch, maximum 5 batches running at once), the rstan checks finished in ~3.5 hours. This might increase as the number of incompatible packages increases (currently 64 not building), but I'm hoping that the twin dials for batch size and parallelism will keep the impact fairly minimal

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Andrew Johnson

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@andrjohns

Copy link
Copy Markdown
Contributor Author

I've tweaked the config to allow for customising the sources for rstan/StanHeaders/rstantools to use when running the revdeps (i.e., CRAN or github ref), and skipped running donttest{} examples by default (with an option to enable). This brings the revdeps running time down to only ~1.5hrs (example here)

@jgabry

jgabry commented Jul 17, 2026

Copy link
Copy Markdown
Member

If this is working well can we use this same workflow (or a slightly modified one) to do the reverse dependency checks for rstantools? Although I guess doing the rstan checks is essentially already checking all the rstantools reverse dependencies I would assume. So maybe we only need this here and not also in rstantools?

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