From 6ba98e92cd02368aeaca386d6a775cdce437cff5 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 6 Oct 2023 15:16:47 +0300 Subject: [PATCH] Fix js lookup syntax error --- rstan/rstan/R/zzz.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rstan/rstan/R/zzz.R b/rstan/rstan/R/zzz.R index de088444f..3f648c594 100644 --- a/rstan/rstan/R/zzz.R +++ b/rstan/rstan/R/zzz.R @@ -24,7 +24,7 @@ OUT <- 0 assign("stanc_ctx", V8::v8(), envir = topenv()) } else assign("stanc_ctx", QuickJSR::JSContext$new(stack_size = 4 * 1024 * 1024), envir = topenv()) stanc_js <- system.file("stanc.js", package = "StanHeaders", mustWork = TRUE) - if (!stanc_ctx$validate(stanc_js)) { + if (!file.exists(stanc_js)) { stanc_js <- system.file("exec", "stanc.js", package = "rstan", mustWork = TRUE) } stanc_ctx$source(stanc_js)