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

Allow driver code to set printed argument list in generated hpp #1231

Merged
merged 3 commits into from Jul 25, 2022

Conversation

WardBrian
Copy link
Member

@WardBrian WardBrian commented Jul 25, 2022

Submission Checklist

  • Run unit tests
  • Documentation
    • OR, no user-facing changes were made

Release notes

The generated model_compile_info will now feature arguments passed in from stancjs

Copyright 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)

@WardBrian
Copy link
Member Author

I’d like to write a good test for this before merging, I eyeballed that it looks correct

Copy link
Member

@hsbadr hsbadr left a 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

Copy link
Member

@hsbadr hsbadr left a 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.

@WardBrian
Copy link
Member Author

@rok-cesnovar should be ready now. I would also like to include this in the patch release

Copy link
Member

@rok-cesnovar rok-cesnovar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@WardBrian WardBrian merged commit e1c6ac6 into master Jul 25, 2022
@WardBrian WardBrian deleted the fix/drivers-set-arg-output branch July 25, 2022 20:25
WardBrian added a commit that referenced this pull request Jul 26, 2022
Allow driver code to set printed argument list in generated hpp
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.

None yet

3 participants