Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed Jan 21, 2024
1 parent 006a7f2 commit 65cc780
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
3 changes: 2 additions & 1 deletion R/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,8 @@ compile <- function(quiet = TRUE,
)
}

writeLines(private$model_methods_env_$hpp_code_, private$hpp_file_)
writeLines(private$model_methods_env_$hpp_code_,
con = wsl_safe_path(private$hpp_file_, revert = TRUE))
} # End - if(!dry_run)

private$exe_file_ <- exe
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-install.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test_that("install_cmdstan() successfully installs cmdstan", {
install_cmdstan(dir = dir, cores = 2, quiet = FALSE, overwrite = TRUE,
release_url = cmdstan_test_tarball_url,
wsl = os_is_wsl()),
"Compiling, linking C++ code",
"Compiling C++ code",
fixed = TRUE
),
"CmdStan path set",
Expand Down
10 changes: 0 additions & 10 deletions tests/testthat/test-model-compile.R
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,6 @@ test_that("compile errors are shown", {
)
})

test_that("compile suggests using format to fix old syntax", {
stan_file <- testing_stan_file("old_array_syntax")
expect_error(
cmdstan_model(stan_file),
"To fix deprecated or removed syntax please see ?cmdstanr::format for an example.",
fixed = TRUE
)
})

test_that("dir arg works for cmdstan_model and $compile()", {
tmp_dir <- tempdir()
tmp_dir_2 <- tempdir()
Expand Down Expand Up @@ -858,4 +849,3 @@ test_that("STANCFLAGS included from make/local", {
expect_output(print(out), out_w_flags)
cmdstan_make_local(cpp_options = make_local_old, append = FALSE)
})

0 comments on commit 65cc780

Please sign in to comment.