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 syntax compatibility with rstan 2.26 #2

Merged
merged 1 commit into from
Feb 11, 2023
Merged

Fix syntax compatibility with rstan 2.26 #2

merged 1 commit into from
Feb 11, 2023

Conversation

andrjohns
Copy link
Contributor

This PR updates your Stan syntax for compatibility with the upcoming rstan 2.26, and removes files that are auto-generated by rstantools on installation.

Your model syntax was updated to to fix cases where a variable was declared with the same name as a function (e.g., log_h), which errors with the new parser

@Philip-Cooney
Copy link
Owner

@andrjohns Many Thanks for raising this issue and correcting the code. I am very much a newbie with Github. This current version on Github is actually behind the one on CRAN.

The reason for this is that I build the latest version of expertsurv a Fedora computer (which I submitted to CRAN) but can't upload this to Github because of the very large .so file (I replied in here but realize that I should have added an @ for you - https://discourse.mc-stan.org/t/so-file-size-when-building-an-r-package-that-uses-compiled-stan-code/16530/8).

If I could get the .so file version reduced, then I can upload the files to Github, and will be happy to make the changes you suggest.

@andrjohns
Copy link
Contributor Author

No worries!

You don't need to be uploading/committing the compiled/objects code for R packages, since they will be built from source regardless. Additionally, the compiled object/.so file will only be compatible with the operating system that it was compiled on, so it's generally not too helpful.

For stan-based packages specifically, you also generally shouldn't be committing the src folder at all (unless you have additional custom code to be compiled) as the c++ for your model will be generated by rstantools when your package is installed.

@Philip-Cooney Philip-Cooney merged commit 7e4a107 into Philip-Cooney:master Feb 11, 2023
@Philip-Cooney
Copy link
Owner

Fantastic! Thanks for the explanation. I'll fix this first this first thing Monday on the CRAN branch and then submit in a while when I have some other updates processed.

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