-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
CRAN M1 issue - parser failed badly; maybe try installing the V8 package #1154
Comments
I have just been contacted by Prof Ripley pointing to this exact same issue which is also triggered by our @bgoodri or @andrjohns ... any suggestions? Something we can do to help debug and resolve the matter? |
I am aware of it. I do not think there is a good reason why Stan packages should have problems when the C23 standard is enforced in addition to C++17, but that seems to affect the way V8 is built, and now the javascript version of |
The fact that silent=TRUE is set in the try call might make this harder to diagnose |
Looking at the stan files in the You can reproduce the behaviour locally using the RHub docker container for C23:
|
Good. Does anyone have a theory as to what C23 has to do with anything? |
I think it's just a change in the toolchain, since C23 is using clang - and the current I think that block might be redundant though, since the block above already looks like it's replacing the |
And for a simpler reprex with the With pak::pak("rstan")
res1 <- rstan::stanc(model_code="data {}\n // Comment")
res2 <- rstan::stanc(model_code="data {}\n // Comment with #")
# TypeError: not a function
# at aRz (<input>:235:25)
# at dK7 (<input>:764:9)
# at ee (<input>:766:14)
# at dIb (<input>:25502:3)
#
# Error in model_cppcode$errors : $ operator is invalid for atomic vectors And with pak::pak("V8")
res1 <- rstan::stanc(model_code="data {}\n // Comment")
res2 <- rstan::stanc(model_code="data {}\n // Comment with #")
# Error in rstan::stanc(model_code = "data {}\n // Comment with #") :
# parser failed badly; maybe try installing the V8 package |
I knew I wasn't crazy to suggest the What's less clear to me is how to fix it. On more recent versions of Stan, all of the preprocessing code in RStan can just be replaced with passing an extra argument to stancjs that contains the files to-be-included, but for the version currently on CRAN some form of processing needs to be done, it just probably shouldn't invoke |
Yeah, about 10 years ago I wrote the R code to walk through the lines of Stan code and resolve the |
:) At the very least from the |
It does appear brms has at least one So this will potentially hit downstream users of brms as well |
@paul-buerkner Can you ensure the generated Stan code has no |
@bgoodri can you make a branch with the current state of CRAN rstan? I can have a look at some fixes over the next couple days |
If I just remove that C pre-processor block from the CRAN rstan source, then all of the reverse-dependencies build and install in the C23 docker image without any issues - so it might be a simple fix after all I'll kick off a proper reverse-dependencies run now to make sure that all of the tests/checks also still pass |
@bgoodri all revdeps pass under the |
Dear maintainer, Please see the problems shown on Please correct before 2025-03-11 to safely retain your package on CRAN. Packages using rstan::stanc are failing to install in R-devel The CRAN TeamHi everyone, I have received a similar email to @wds15 regarding my R package. The package does not pass the check in the flavors r-devel-linux-x86_64-debian-clang and r-devel-linux-x86_64-fedora-clang. I have removed All the best, |
@bernadette-eu looking at the results of the resubmission checks eveything is installing and running without issue, with the only NOTE referring to your specification of arXiv references in the DESCRIPTION file:
|
@andrjohns Thanks for getting back to me. Let me elaborate: Dear maintainer, package Bernadette_1.1.6.tar.gz does not pass the incoming checks automatically, please see the following pre-tests (additional issue checks): Last released version's CRAN status: OK: 9, NOTE: 4, ERROR: 2 Last released version's additional issues: CRAN Web: https://cran.r-project.org/package=Bernadette Please fix all problems and resubmit a fixed version via the webform. More details are given in the directory: No strong reverse dependencies to be checked. Best regards, The Description field contains |
Yep, as that message says the pre-tests identified 1 NOTE in the Debian and Windows pretests, and the NOTE is copied at the bottom of the message (the arxiv reference). The other links/failures are all for the 'last released' version of your package (i.e., what is currently on CRAN) |
OK, this looks good. I am going to run the tests on the |
Hi,
We have an issue with
rstan
specifically on the CRAN M1 Mac mini systems. For transparency I had originally raised this issue on the Stan forum here however since then we have received an escalation email from CRAN:I couldn't see any corresponding issue thread here so figured I would open this (please close if you are tracking elsewhere). We are currently considering switching to
cmdstanr
(as advised) and disabling the relevant tests on CRAN but figured we'd post this issue here in case there is any additional action needed on your side to avoid further issues with the CRAN team.Full error message for context:
https://www.stats.ox.ac.uk/pub/bdr/M1mac/rbmi.out
The text was updated successfully, but these errors were encountered: