File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -3925,15 +3925,16 @@ add_dummies <- function(dir, Log)
3925
3925
3926
3926
check_rust <- function()
3927
3927
{
3928
- ## It is impossible to tell definiitively if a package
3929
- ## compiles rust code. SystemRequirements in DESCRIPTION is
3930
- ## fres-format, and only advisory. So we look at the
3931
- ## installation log, which we found in check_src()
3928
+ ## A Cargo.toml file is used to identify a rust package,
3929
+ ## so check for Cargo.toml under src to see if rust code
3930
+ ## is compiled in the crate
3932
3931
if (is.na(InstLog)) return (NA)
3932
+ srcd <- file.path(pkgdir, "src")
3933
+ if (length(Sys.glob(paste0(srcd, "/**/Cargo.toml"))) == 0) return (NA)
3933
3934
##message("InstLog = ", InstLog)
3934
3935
lines <- readLines(InstLog, warn = FALSE)
3935
3936
l1 <- grep("(cargo build| Compiling )", lines)
3936
- if(!length(l1)) return(NA)
3937
+ if(!length(l1)) return (NA)
3937
3938
l2 <- grep(" Compiling ", lines)
3938
3939
checkingLog(Log, "Rust compilation")
3939
3940
msg <- character(); OK <- TRUE
You can’t perform that action at this time.
0 commit comments