feat: Require the OpenMP runtime for CRAN packages that use OpenMP #2935
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.55) × (1 − Review Confidence (0.44)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.55 · 359 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 10%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.352
Shallow Review Depth
shallow_review_depth
0.344
No Reviewer Assigned
no_reviewer_assigned
0.120
Real PR Conversation Timeline
1 comments
"Review active on #2935"
general
weight: 0.35
matthewfeickert
Part of Issue #2891 (feedback from @danielnachun originally posted in PR #2759), following PR #2901, PR #2918 and PR #2929.
A compiled CRAN package built with R's OpenMP flags, such as
data.table, got no OpenMP runtime in itshostrequirements. Thesrc/Makevarsfiles that PR #2929 reads for BLAS and LAPACK are now also checked for$(SHLIB_OPENMP_CFLAGS),$(SHLIB_OPENMP_CXXFLAGS),$(SHLIB_OPENMP_FFLAGS)and$(SHLIB_OPENMP_FCFLAGS)(in either the$(…)or${…}form), and a reference to any of them adds the OpenMP runtime of the platform's compilers tohost:llvm-openmpon macOS, where conda-forge builds with clang, andlibgompelsewhere, where it builds with GCC or, on Windows, MinGW GCC.The check reuses the Makevars contents from PR #2929, so the tarball is still decompressed only once, and the BLAS and LAPACK check and the new one now share a single helper that asks whether any Makevars file references any of a list of make variables. As the two runtimes are platform-conditional, they are added after the plain
hostrequirements, asif:/then:entries. Without a tarball there is nothing to inspect, and the output is unchanged.For example,
rattler-build generate-recipe cran data.tablenow gives:This is the fourth of a series of small PRs for Issue #2891, kept apart for easier review. The last one builds on this one and will follow:
1. PR #2901: the Fortran compiler for Fortran sources (merged)
2. PR #2918: the C++ compiler only for packages with C++ sources (merged)
3. PR #2929:
libblasandliblapackfor packages whosesrc/Makevarsuse$(BLAS_LIBS)or$(LAPACK_LIBS)(merged)4. this PR: the OpenMP runtime for
$(SHLIB_OPENMP_FLAGS)5. the MinGW (
m2w64_) compilers and MSYS2 (m2-*) tools on WindowsTesting
pixi run cargo test -p rattler_build_recipe_generator, with a new unit test that builds in-memory tarballs with each of the four OpenMP flags, checks that a Makevars file without them does not count, and compares the resultinghostrequirements, conditionals included, as valuespixi run --environment=lint cargo-fmt(no changes) andcargo clippy -p rattler_build_recipe_generator --all-targets -- -D warningsdata.table(gets the OpenMP runtime),quantreg(gets onlylibblasandliblapack) andglmnet(gets neither, as itssrc/Makevarsuses no OpenMP flags)I did not build
data.tablefrom the generated recipe for this PR. Its build fails for an unrelated reason that this series does not touch: the generator maps itsMPL-2.0license to a license file thatr-basedoes not ship, so no license file is copied.🤖 Generated with Claude Code