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
Allow driver code to set printed argument list in generated hpp #1231
Conversation
I’d like to write a good test for this before merging, I eyeballed that it looks correct |
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.
@WardBrian This does print the flags in the compile info:
inline std::vector<std::string> model_compile_info() const noexcept {
return std::vector<std::string>{"stanc_version = stanc3 v2.30.0-37-g09a0377", "stancflags = O1"};
}
It might be useful to add them with the version comment too:
// Code generated by stanc v2.30.0-37-g09a0377
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.
@WardBrian Would it make sense to unify how the flags are printed? For example, stanc
binary gets stancflags = --O1
while the JS generates stancflags = O1
. Alternatively, you may mention that it's command line or JS in the model compile info.
@rok-cesnovar should be ready now. I would also like to include this in the patch release |
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.
Great, thanks!
Allow driver code to set printed argument list in generated hpp
Submission Checklist
Release notes
The generated
model_compile_info
will now feature arguments passed in from stancjsCopyright and Licensing
By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)