feat: R-minor-sensitive binary builds (full + iterative) (#84)
Some checks failed
ci/crow/cron/process-updates-ubuntu-2204-amd64 Pipeline was successful
ci/crow/cron/process-updates-ubuntu-2204-arm64 Pipeline failed

## Summary

Builds R-minor-sensitive CRAN packages once per installed R minor version (into per-minor S3 slots `…/contrib/<x.y>/`) and everything else once into the generic slot, driven by bincraft 4.2.0's ABI classifier. Both the full and iterative pipelines are covered.

## What's in here

**Detection / precompute**

- `local/r-minor-helpers.R` — pure `classify_from_metadata()` (NeedsCompilation / risky `LinkingTo`) + `parse_build_args()`, with unit tests.
- `local/packages-to-build.R` — adds a per-package `r_minor_sensitive` flag: cheap CRAN-metadata rules first, source download + `bincraft::needs_per_minor_recompile()` only for the ambiguous compiled subset (fail-safe to sensitive). Classified once per package, applied to all versions.

**Full build**

- `local/build-all.R` — passes the per-row `is_r_minor_sensitive` flag; new `--sensitive-only` mode builds just the risky subset.
- `.crow/build-all-versions-{amd64,arm64}.yaml` — install-deps persists the sensitive subset; build step runs a sensitive-only pass under each non-primary `/opt/R/*` minor; new step uploads the generic index plus a per-minor index for each minor.

**Iterative build**

- All 14 `.crow/process-updates-*.yaml` — primary pass uses `r_minor_detection = 'classifier'`; a sensitive-only multi-R pass builds risky updates under each other minor; per-minor index upload added.

**Tooling / housekeeping**

- Pins bincraft `v4.1.1` → `v4.2.0` across all workflows; removes the superseded standalone `build-r-minor-sensitive-packages.yaml`.
- Adds prek/pre-commit hooks (prettier, markdownlint, editorconfig-checker, yamllint, air) and applies them repo-wide; excludes the verbatim GPL `LICENSE.md` and auxiliary shell scripts.
- Design + implementation docs under `docs/superpowers/`.

## Requires before merge

- A `v4.2.0` git tag must be pushed on the bincraft repo (codefloe.com/rpkgs/bincraft) — the workflow install steps pin `@v4.2.0`. The full-build install-deps clones `main`, so it is unaffected.

Reviewed-on: #84
This commit is contained in:
Patrick Schratz 2026-06-14 08:04:40 +00:00 committed by Patrick Schratz
commit d558e27c11

View file

@ -186,19 +186,19 @@ Below is a collection of raw errors observed during the build process:
<details>
```
```text
* installing to library '/tmp/Rtmp7WPw19/temp_libpath114b846b58'\n* installing *source* package 'ade4' ...\n** using staged installation\nERROR: a 'NAMESPACE' file is required\n* removing '/tmp/Rtmp7WPw19/temp_libpath114b846b58/ade4'\n"
```
Tag does not have a NAMESPACE file and hence cannot be built.
```
```text
"* installing to library '/tmp/RtmpLcCitS/temp_libpath1146aabbe92'\nERROR: dependency 'tripack' is not available for package 'alphahull'\n* removing '/tmp/RtmpLcCitS/temp_libpath1146aabbe92/alphahull'\n"
```
Dependency not available: Either because the dependency was not declared or errored itself during installation.
```
```text
In function '\033[01m\033[KRcpp::List solveRRBLUP(const mat&, const mat&, const mat&)\033[m\033[K':\n\033[01m\033[KMME.cpp:162:61:\033[m\033[K \033[01;31m\033[Kerror: \033[m\033[K'\033[01m\033[KPI\033[m\033[K' was not declared in this scope\n 162 | double ll = -0.5*(double(optRes[\"objective\"])+df+df*log(2*\033[01;31m\033[KPI\033[m\033[K/df));\n | \033[01;31m\033[K^~\033[m\033[K\n\033[01m\033[KMME.cpp:\033[m\033[K In function '\033[01m\033[KRcpp::List solveRRBLUPMV(const mat&, const mat&, const mat&, int, double)\033[m\033[K':\n\033[01m\033[KMME.cpp:277:31:\033[m\033[K \033[01;31m\033[Kerror: \033[m\033[K'\033[01m\033[KPI\033[m\033[K' was not declared in this scope; did you mean '\033[01m\033[KHI\033[m\033[K'?\n 277 | ll -= double(n*m)/2.0*log(2*\033[01;31m\033[KPI\033[m\033[K);\n | \033[01;31m\033[K^~\033[m\033[K\n | \033[32m\033[KHI\033[m\033[K\nmake: *** [/opt/R/4.4.1/lib/R/etc/Makeconf:204: MME.o] Error 1\nERROR: compilation failed for package 'AlphaSimR'\n* removing '/tmp/RtmpclI5CE/temp_libpath11135d215d5/AlphaSimR'\n
```
@ -230,26 +230,26 @@ For others it might be due to exotic external dependencies which require manual
Help in resolving these issues are highly welcome!
| Name | Platform | Arch | Reason | Solved via | Date Created | Date Solved |
| ------------- | -------------- | ------- | -------------------------------- | ---------- | ------------ | ----------- |
| Apollonius | redhat-8 | | gmp missing | 2024-11-15 | |
| doBy | alpine-320 | amd | hangs | 2024-11-23 | |
| later | ubuntu 22 & 24 | amd | hangs for early versions - xfvb? | 2024-11-23 | |
| CoTiMA | ubuntu 22 & 24 | amd | OOM? | 2024-11-23 | |
| FrF2 | alpine | arm | hangs | 2024-11-23 | |
| FrF2.catlg128 | alpine | arm | hangs | 2024-11-23 | |
| DoE.base | alpine | arm/amd | hangs | 2024-11-23 | |
| eha | alpine | amd | hangs | 2024-11-23 | |
| gRain | alpine | amd | hangs | 2024-11-23 | |
| gRbase | alpine | amd | hangs | 2024-11-24 | |
| IDPmisc | alpine | amd | hangs | 2024-11-24 | |
| RVAideMemoire | alpine | amd | hangs | 2024-11-25 | |
| pbkrtest | alpine | arm | hangs | 2024-11-25 | |
| seewave | alpine | arm | hangs | 2024-11-25 | |
| spdep | alpine | arm | hangs | 2024-12-03 | |
| compareGroups | alpine | arm | hangs | 2024-12-11 | |
| SNPassoc | alpine | arm | hangs | 2024-12-11 | |
| surveillance | alpine | arm | hangs | 2024-12-13 | |
| Name | Platform | Arch | Reason | Date Created | Date Solved |
| ------------- | -------------- | ------- | -------------------------------- | ------------ | ----------- |
| Apollonius | redhat-8 | | gmp missing | 2024-11-15 | |
| doBy | alpine-320 | amd | hangs | 2024-11-23 | |
| later | ubuntu 22 & 24 | amd | hangs for early versions - xfvb? | 2024-11-23 | |
| CoTiMA | ubuntu 22 & 24 | amd | OOM? | 2024-11-23 | |
| FrF2 | alpine | arm | hangs | 2024-11-23 | |
| FrF2.catlg128 | alpine | arm | hangs | 2024-11-23 | |
| DoE.base | alpine | arm/amd | hangs | 2024-11-23 | |
| eha | alpine | amd | hangs | 2024-11-23 | |
| gRain | alpine | amd | hangs | 2024-11-23 | |
| gRbase | alpine | amd | hangs | 2024-11-24 | |
| IDPmisc | alpine | amd | hangs | 2024-11-24 | |
| RVAideMemoire | alpine | amd | hangs | 2024-11-25 | |
| pbkrtest | alpine | arm | hangs | 2024-11-25 | |
| seewave | alpine | arm | hangs | 2024-11-25 | |
| spdep | alpine | arm | hangs | 2024-12-03 | |
| compareGroups | alpine | arm | hangs | 2024-12-11 | |
| SNPassoc | alpine | arm | hangs | 2024-12-11 | |
| surveillance | alpine | arm | hangs | 2024-12-13 | |
## CDN Settings