Skip to content

Commit 4a20515

Browse files
committed
Workaround for mangling in disbayes
1 parent 84fd505 commit 4a20515

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

R/rstan_config.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ rstan_config <- function(pkgdir = ".") {
368368
stanmodels[(model_line+2):load_line],
369369
load_module,
370370
stanmodels[(load_line+2):nlines])
371-
if (is_excepted && !is.null(cpp_pre_process[[pkg_name]])) {
371+
if (!is.null(cpp_pre_process[[pkg_name]])) {
372372
process_fun <- c("process_fun <- ", deparse(cpp_pre_process[[pkg_name]]))
373373

374374
process_text <- c(

R/stanc_exceptions.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,10 @@ cpp_pre_process <- list(
6868
cbq = function(cpp_code) {
6969
cpp_code <- gsub("offset_par", "offset", cpp_code, fixed = TRUE)
7070
cpp_code
71+
},
72+
# rstan 2.32 does not account for new stanc mangling
73+
disbayes = function(cpp_code) {
74+
cpp_code <- gsub("_stan_mips", "mips", cpp_code, fixed = TRUE)
75+
cpp_code
7176
}
7277
)

0 commit comments

Comments
 (0)