
Classify an R source package by its ABI-risk tier
abi_classify.RdInspects an unpacked R source package (or a .tar.gz of one) and labels it
as one of:
Value
A list with elements:
tier: one of"pure-r","safe-compiled","risky".reason: short string explaining the classification.hits: character vector of packages or symbols that triggered"risky"; empty otherwise.
Details
"pure-r": no compilation needed — build once, serve for every R-version slot."safe-compiled": compiles, but only touches the stable R C-API — build once per major.minor."risky": links to a known-volatile dependency (e.g.Rcpp,rlang) or references internal R C-API symbols known to change across minor versions — build per R minor version.
Decision rules (first match wins):
pure-rifDESCRIPTIONhasNeedsCompilation: no, or there is nosrc/, orsrc/contains no.c,.cc,.cpp,.f,.f90files.riskyifLinkingTomentions any package inabi_risky_linking_deps().riskyif any file insrc/mentions a symbol inabi_volatile_symbols()(plain regex grep, no C parsing).safe-compiledotherwise.