Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Minor Compatibility fixes #42

Merged
merged 2 commits into from
Sep 28, 2021
Merged

Minor Compatibility fixes #42

merged 2 commits into from
Sep 28, 2021

Conversation

andrjohns
Copy link

Hi,

Just a couple of more fixes. Your .Rbuildignore file included the configure script, which was stopping rstantools from automatically configuring on package install. Additionally, if you include already-generated headers (e.g., src/stanExports_Exponential.cc) your package, then it will only be compatible with the version of rstan used to generate the headers. By deleting the headers and re-enabling the configure script, your package will remain compatible between rstan versions.

Let me know if you had any questions/clarifications about all that.

Thanks!
Andrew

@giabaio
Copy link
Owner

giabaio commented Sep 28, 2021

Thank you, @andrjohns. You say

Just a couple of more fixes. Your .Rbuildignore file included the configure script, which was stopping rstantools from automatically configuring on package install.

I think that's fine and can be safely removed. Though can I check that it doesn't mess up with what is actually then synced in the remote? (I don't think so...).

Also, you say

Additionally, if you include already-generated headers (e.g., src/stanExports_Exponential.cc) your package, then it will only be compatible with the version of rstan used to generate the headers. By deleting the headers and re-enabling the configure script, your package will remain compatible between rstan versions.

Fair enough -- but again, can I check that you've checked that this still works as in not needing to recompile the models once the package is installed?

Thanks
Gianluca

@andrjohns
Copy link
Author

I think that's fine and can be safely removed. Though can I check that it doesn't mess up with what is actually then synced in the remote? (I don't think so...).

As in will the configure files then be distributed with the package? Yes, which is what you want. The configure files call rstantools when the user installs your package, and then rstantools takes care of updating your Makevars and generating and compiling your stan model.

Fair enough -- but again, can I check that you've checked that this still works as in not needing to recompile the models once the package is installed?

Yep, this just allows rstantools to generate the c++ at the time of your package install (with whichever version of rstan is installed). The stan models themselves still only need to be compiled once (on package install/build)

@giabaio giabaio merged commit 33e4f6a into giabaio:devel Sep 28, 2021
@giabaio
Copy link
Owner

giabaio commented Sep 28, 2021

OK - merged into devel now. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants