Report the stanc flags make/local added in stan_build_info() - #1283
Merged
Merged
Conversation
The build record already held stanc_options_from_make, the STANCFLAGS that make/local contributed to the stanc call. The public result left it out with the other assembly fields. It is kept now for the same reason as include_paths: make/local can change after a build, so the file alone does not say which flags the build saw. Part of #1258.
The build record section of the vignette now reads the record back with $build_info() and points at stan_build_info() for a bare executable path. The example copies bernoulli into tempdir() under its own name, so the paths and the record file read as bernoulli. The printer says "none" for empty include_paths as it does for the other option lines, and the status lines for a record that is missing, unreadable, mismatched or in another format fit in 80 columns and say what happened and what to do. One snapshot test covers the printed form of every record state. Part of #1258.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1.0 #1283 +/- ##
=======================================
Coverage ? 93.47%
=======================================
Files ? 19
Lines ? 7263
Branches ? 0
=======================================
Hits ? 6789
Misses ? 474
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Submission Checklist
Summary
This PR and the summary below were assisted by AI. I have reviewed all code and doc.
stan_build_info()now includesstanc_options_from_makeunderconfiguration: theSTANCFLAGSthatmake/localadded to the stanc call,minus any the call's own
stanc_optionsoverrode. The build record alreadyheld it; #1278 left it out of the public result and Codex's review suggested
adding it. The case is the same as for
include_paths:make/localcanchange after a build, so the file alone doesn't say which flags the build
saw.
R/build_record.R: the field in the result and a printer line afterstanc_options; roxygen bullet, and the "leaves out" paragraph no longernames it.
dev-notes/compilation-state.md§8: withheld sentence and diagnosis ruleupdated, example shape gains the field; contract regenerated.
tests/testthat/test-build-info.R: the field is expected in the publicshape and read back as recorded.
The second commit makes the function visible and tidies its printer:
vignettes/cmdstanr-internals.Rmd: the build record section reads therecord back with
$build_info()and points atstan_build_info(). Theexample now copies bernoulli into
tempdir()under its own name, so thepaths and the record file read as
bernoullirather than a randomtempfile name, and the record listing is narrowed to that model.
print.stan_build_info():include_pathsprints "none" when empty likethe other option lines, and the status lines for a missing, unreadable,
mismatched or wrong-format record are under 80 characters and say what
happened and what to do.
of the fragment checks.
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: