Closed ben18785 closed 9 months ago
Update: the Stan model compiles if I just do:
stan_model <- cmdstanr::cmdstan_model(
"src/stan/conditional_renewal.stan",
compile_model_methods=TRUE,
force_recompile=TRUE)
in the console. It also compiles if I do the following in the console:
instantiate::stan_package_compile(
models = instantiate::stan_package_model_files(path = bin_stan),
compile_model_methods=TRUE,
force_recompile = TRUE
)
It just fails, when I do devtools::install()
Describe the bug
Cannot use precompiled model so that it allows log_p to be used within a package.
To Reproduce
instantiate::stan_package_create("mypackage")
instantiate::stan_package_configure()
install.libs.R
file so that the bottom becomes:devtools::install()
which then fails to install with the following errors at the end:Expected behavior
Package installs; it works fine when I don't edit the install.libs.R file to include compile_model_methods=TRUE
Session info