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

Simplify error reporting during compile() #620

Merged
merged 3 commits into from
Sep 21, 2022

Conversation

WardBrian
Copy link
Member

Submission Checklist

  • Run unit tests
  • Declare copyright holder and open-source license: see below

Summary

Closes #618. This change makes it so we are never in a situation where compilation failed but nothing gets printed. It does that by trying to be less clever about errors, it just unconditionally prints the console if make failed.

This also fixes something which has bugged me for a while, which is that compile never threw its own error, but rather this error was thrown after the fact in the constructor. This was really confusing, especially if you initialized the model with compile=False and called compile() later.

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

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

@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2022

Codecov Report

Merging #620 (c10293a) into develop (1c761ff) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop     #620      +/-   ##
===========================================
- Coverage    80.16%   80.14%   -0.02%     
===========================================
  Files           69       69              
  Lines        10338    10317      -21     
===========================================
- Hits          8287     8269      -18     
+ Misses        2051     2048       -3     
Impacted Files Coverage Δ
cmdstanpy/cmdstanpy/model.py 88.47% <0.00%> (+0.03%) ⬆️
...runner/work/cmdstanpy/cmdstanpy/cmdstanpy/model.py 88.47% <0.00%> (+0.03%) ⬆️
a/cmdstanpy/cmdstanpy/cmdstanpy/model.py 89.71% <0.00%> (+0.05%) ⬆️

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

Copy link
Member

@mitzimorris mitzimorris left a comment

Choose a reason for hiding this comment

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

LGTM

@ahartikainen ahartikainen merged commit 1e3f066 into develop Sep 21, 2022
@WardBrian WardBrian mentioned this pull request Sep 23, 2022
@WardBrian WardBrian deleted the fix/618-compile-errors branch February 5, 2024 19:48
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.

better message when failing to compile
4 participants