Checks whether the submission compiles native code and, if so, whether it
documents the compiler toolchain a reviewer needs to build it. FDA reviewers
run R on Windows with Rtools; CRAN packages install as prebuilt Windows
binaries and need no toolchain, but a submission that ships C, C++, or Fortran
source, a src/ folder, a Makevars build script, or an inline compilation
call (Rcpp::sourceCpp(), cppFunction(), R CMD SHLIB) must be built from
source, which fails on a reviewer's machine without the matching Rtools.
Returns evidence with indicator_id = "R-REPRO-012":
Arguments
- path
Path to the submission's analysis code folder.
- ctx
A run context from
r4subcore::r4sub_run_context(). WhenNULLa default context is created from the folder name.- config
A configuration from
repro_config_default(). WhenNULLthe default configuration is used.
Details
pass - no native compilation (CRAN binaries suffice), or compilation is present and the Rtools toolchain is documented.
warn - the submission compiles native code but does not document the Rtools toolchain needed to build it on Windows.
Examples
d <- file.path(tempdir(), "sub012")
dir.create(d, showWarnings = FALSE)
writeLines("x <- dplyr::filter(mtcars, mpg > 20)", file.path(d, "a.R"))
ev <- suppressMessages(assess_compiled_toolchain(d))
ev$result
#> [1] "pass"