-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
RStan is passing the wrong type for the code argument to stanc.js on Windows #1145
Comments
Note that directly using The array being passed seems to be split at newlines: @hsbadr could you look into this? It's generating a lot of noise in the stanc3 repo, and it looks like most of the users are using |
Note: setting my line endings to CRLF on ubuntu still didn't trigger the same behavior as Windows |
This has lead to stan-dev/stanc3#1446 and the seven duplicates therein.
I think the issue is the code that reads from a file is returning a vector of strings, rather than just one string. No idea why this is OS-specific.
This might be related to my pr #1124 which touches some of the same code
Description:
This model consistently raises an error on Windows, but not on other platforms:
> rstan::stanc("./m2.stan")
yieldsBy replacing the
stanc.js
with the non-minified version, and adding some extra printing code to it, this became clear:b
above is the code stringThat is why this code does not lead to a crash:
(though, it does raise a genuine syntax error, which is good!)
RStan Version:
‘2.36.0.9000’
R Version:
"R version 4.4.2 (2024-10-31 ucrt)"
Operating System:
Windows 11
The text was updated successfully, but these errors were encountered: