Skip to content

Exclude STAN_VERSION from cpp_options() - #1215

Merged
jgabry merged 1 commit into
masterfrom
bugfix/cpp-options-stan-version
Jul 23, 2026
Merged

Exclude STAN_VERSION from cpp_options()#1215
jgabry merged 1 commit into
masterfrom
bugfix/cpp-options-stan-version

Conversation

@jgabry

@jgabry jgabry commented Jul 22, 2026

Copy link
Copy Markdown
Member

Submission Checklist

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

Summary

model_compile_info() returns uppercase keys, so the comparison against lowercase "stan_version" never matched and the executable's Stan version was stored as if it were a C++ option. We can just use tolower() to fix it.

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):
Jonah Gabry

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

model_compile_info() returns uppercase keys, so the guard in
CmdStanModel$initialize() comparing against lowercase "stan_version" never matched and the executable's Stan version was stored as if it were a C++ option. Use tolower() so the guard works as intended.
@codecov-commenter

codecov-commenter commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.69%. Comparing base (5f6e8c3) to head (48a07b9).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1215   +/-   ##
=======================================
  Coverage   91.69%   91.69%           
=======================================
  Files          15       15           
  Lines        6246     6246           
=======================================
  Hits         5727     5727           
  Misses        519      519           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jgabry
jgabry merged commit aae24ed into master Jul 23, 2026
15 checks passed
@jgabry
jgabry deleted the bugfix/cpp-options-stan-version branch July 23, 2026 14:36
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.

2 participants