Skip to content
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

Allow V8 namespace check to fail quietly #1096

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
_R_CHECK_FORCE_SUGGESTS_: false
run: |
if (R.version$major < 4 && isTRUE(.Platform$OS.type == "windows")) {
dotR <- file.path(Sys.getenv("HOME"), ".R")
Expand Down
2 changes: 1 addition & 1 deletion rstan/rstan/R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RNG <- 0
OUT <- 0

.onLoad <- function(libname, pkgname) {
if (requireNamespace("V8")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already on CRAN, although we might need to tweak main.yaml. Is your develop branch up to date?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifically commit a6c8704

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good catch, yep it's already in develop.

But according to the CRAN source it's not on CRAN: https://github.com/cran/rstan/blob/0e3de1d25a6225d56eb182cb8f949a563c987948/R/zzz.R#L23

if (requireNamespace("V8", quietly = TRUE)) {
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)
Expand Down
Loading