@@ -83,28 +83,7 @@ stanc_process <- function(file, model_code = '', model_name = "anon_model",
83
83
}
84
84
85
85
model_code <- gsub(' #include /(.*$)' , ' #include "\\ 1"' , model_code )
86
- has_pound <- any(grepl(" #" , model_code , fixed = TRUE ))
87
-
88
- if (has_pound && isFALSE(auto_format )) {
89
- unprocessed <- tempfile(fileext = " .stan" )
90
- processed <- tempfile(fileext = " .stan" )
91
- on.exit(file.remove(unprocessed ))
92
- writeLines(model_code , con = unprocessed )
93
- ARGS <- paste(" -E -nostdinc -x c++ -P -C" ,
94
- paste(" -I" , isystem , " " , collapse = " " ),
95
- " -o" , processed , unprocessed , " -Wno-invalid-pp-token" )
96
- CPP <- system2(file.path(R.home(component = " bin" ), " R" ),
97
- args = " CMD config CC" , stdout = TRUE )
98
- pkgbuild :: with_build_tools(system(paste(CPP , ARGS ),
99
- ignore.stdout = TRUE , ignore.stderr = TRUE ),
100
- required = rstan_options(" required" ) &&
101
- identical(Sys.getenv(" WINDOWS" ), " TRUE" ) &&
102
- ! identical(Sys.getenv(" R_PACKAGE_SOURCE" ), " " ) )
103
- if (file.exists(processed )) {
104
- on.exit(file.remove(processed ), add = TRUE )
105
- model_code <- paste(readLines(processed ), collapse = " \n " )
106
- }
107
- } else model_code <- paste(model_code , collapse = " \n " )
86
+ model_code <- paste(model_code , collapse = " \n " )
108
87
109
88
mostattributes(model_code ) <- model_attr
110
89
0 commit comments