Skip to content

catch PCH errors with informative message feature #384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions R/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,11 @@ compile_method <- function(quiet = TRUE,
spinner = quiet && interactive(),
stderr_line_callback = function(x,p) {
if (!startsWith(x, paste0(make_cmd(), ": *** No rule to make target"))) message(x)
if (regexpr("PCH file uses an older PCH format that is no longer supported", x, fixed = TRUE) > 0
|| regexpr("PCH file built from a different branch", x, fixed = TRUE) > 0) {
warning("Cmdstan encountered an issue with an outdated precompiled header (PCH). Run rebuild_cmdstan() to rebuild the PCH files.\n",
"If the issue persists please open a bug report.")
}
},
error_on_status = FALSE
)
Expand Down