Skip to content

Commit

Permalink
More debuggin WSL failure
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmodrak committed Aug 14, 2023
1 parent 0b78407 commit 8c51b53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions R/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -509,21 +509,20 @@ compile <- function(quiet = TRUE,
stanc_options[["use-opencl"]] <- TRUE
}
if (!is.null(user_header)) {
#user_header <- wsl_safe_path(absolute_path(user_header))
user_header <- user_header
user_header <- wsl_safe_path(absolute_path(user_header))
cpp_options[["USER_HEADER"]] <- user_header
stanc_options[["allow-undefined"]] <- TRUE
private$using_user_header_ <- TRUE
}
if (!is.null(cpp_options[["USER_HEADER"]])) {
cpp_options[["USER_HEADER"]] <- wsl_safe_path(absolute_path(cpp_options[["USER_HEADER"]]))
private$using_user_header_ <- TRUE
#user_header <- cpp_options[["USER_HEADER"]]
user_header <- cpp_options[["USER_HEADER"]]
}
if (!is.null(cpp_options[["user_header"]])) {
cpp_options[["user_header"]] <- wsl_safe_path(absolute_path(cpp_options[["user_header"]]))
private$using_user_header_ <- TRUE
#user_header <- cpp_options[["user_header"]]
user_header <- cpp_options[["user_header"]]
}
if (is.null(stanc_options[["name"]])) {
stanc_options[["name"]] <- paste0(self$model_name(), "_model")
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ wsl_safe_path <- function(path = NULL, revert = FALSE) {
if (os_is_wsl() && !isTRUE(path_already_safe) && !is.na(path)) {
base_file <- basename(path)
path <- dirname(path)
abs_path <- repair_path(utils::shortPathName(path))
abs_path <- repair_path(path)
drive_letter <- tolower(strtrim(abs_path, 1))
path <- gsub(paste0(drive_letter, ":"),
paste0("/mnt/", drive_letter),
Expand Down

0 comments on commit 8c51b53

Please sign in to comment.