-
-
Notifications
You must be signed in to change notification settings - Fork 21
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 RStan 2.26 building & Standalone functions #85
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
87cf723
Add Makevars flags needed for use with RStan 2.26
af897fe
Update inst/include/sys/Makevars.win
a9e8a97
Update inst/include/sys/Makevars
748a84e
Merge branch 'stan-dev:master' into feature/fix_rstan226
andrjohns 4a076b7
Append makevars for install
d9c7f9a
Revert append flags
786bb15
Test standalone
1eed8b6
Compatibility with stanc3
af75fe1
Fix false positive
96b49b7
Fix handling of non-templated plain types
cb5ab9a
Revert makevars changes & fix USE_STANC3 definition
510d867
Re-add makevars changes
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
USE_STANC3
should only be defined if the C++ code is generated bystanc3
. This is ok whenrstan 2.26
is released, but the transition to CRAN may require releasing stan-dev/rstan#912 first that's compatible with the older version ofrstan
. So, ifUSE_STANC3
is defined, Math v4+ headers will be exposed and break the C++ code generated bystanc2
.Solution: While the development version of
rstan
definesUSE_STANC3
in the generated C++ code, it's safe to define it here onlyif (utils::packageVersion("rstan") >= 2.26)
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed this comment! Thanks for clarifying that, good catch. I'll fix that up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries. You may also check
nzchar(system.file("stanc.js", package = "rstan"))
, bututils::packageVersion("rstan") >= 2.26
is the right way since we can remove the local JS to use the nightly version ofstanc3
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrjohns A variant of the following should work: