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

Add version check when exposing external functions #747

Merged
merged 4 commits into from
Mar 24, 2023

Conversation

andrjohns
Copy link
Collaborator

Submission Checklist

  • Run unit tests
  • Declare copyright holder and agree to license (see below)

Summary

This PR closes #713. Currently expose_functions() fails with an uninformative error message if external c++ is used. This is due to a bug in stanc3, and after this PR the generated code will be compatible.

This PR adds a simple version check when exposing external functions

Copyright and Licensing

Please list the copyright holder for the work you are submitting
(this will be you or your assignee, such as a university or company):
Andrew Johnson

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the following licenses:

Copy link
Member

@jgabry jgabry left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @andrjohns!

@codecov-commenter
Copy link

codecov-commenter commented Mar 23, 2023

Codecov Report

Merging #747 (af1954a) into master (4c4dd09) will increase coverage by 2.16%.
The diff coverage is 100.00%.

❗ Current head af1954a differs from pull request most recent head 3642755. Consider uploading reports for the commit 3642755 to get more accurate results

@@            Coverage Diff             @@
##           master     #747      +/-   ##
==========================================
+ Coverage   86.20%   88.37%   +2.16%     
==========================================
  Files          12       12              
  Lines        4082     4086       +4     
==========================================
+ Hits         3519     3611      +92     
+ Misses        563      475      -88     
Impacted Files Coverage Δ
R/model.R 90.56% <100.00%> (+0.14%) ⬆️
R/utils.R 74.51% <100.00%> (+2.10%) ⬆️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@andrjohns andrjohns merged commit 8bb211a into master Mar 24, 2023
@andrjohns andrjohns deleted the expose-functions-external branch March 24, 2023 02:55
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.

Support external C++ with expose_functions()
3 participants