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

Fix issue with recompiling stan code #988

Merged
merged 1 commit into from
Mar 7, 2022
Merged

Fix issue with recompiling stan code #988

merged 1 commit into from
Mar 7, 2022

Conversation

WardBrian
Copy link
Member

Summary:

I have backported the changes from stan-dev/stanc3#1074 into a 2.26 branch here. This PR changes the built stancjs to this version, which resolves an issue where subsequent calls to stancjs did not clean up prior inputs correctly.

This closes #982

Intended Effect:

Subsequent calls to stancjs should work even if earlier calls failed.

How to Verify:

Code provided by @andrjohns. Both calls fail on the current 2.26 version, only the first fails in this branch.

bad_mod <- "parameters { real no_semicolon } model {}"
good_mod <- "parameters { real semicolon; } model {}"

rstan::stanc(model_code = bad_mod)
rstan::stanc(model_code = good_mod)

Side Effects:

None

Documentation:

N/A

Reviewer Suggestions:

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
Simons Foundation

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@WardBrian
Copy link
Member Author

Note that it might be worthwhile adding the code in the PR text as a test, but I am not very familiar with the R unit testing standards

@WardBrian WardBrian requested a review from hsbadr February 23, 2022 01:33
@hsbadr hsbadr merged commit 88c7074 into stan-dev:StanHeaders_2.26 Mar 7, 2022
@hsbadr
Copy link
Member

hsbadr commented Mar 7, 2022

Thanks @WardBrian! I'll release new packages for testing and will work on revamping the unit tests in the experimental branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants