Remove what a build and a syntax check leave in the temp directory - #1275
Merged
Merged
Conversation
A build copied the Stan program into the session's temporary directory and left the copy there, with the C++ make generated from it and the executable it linked, since install_executable() copies the executable rather than moving it. check_syntax_stan_file() left the C++ stanc wrote and stanc_info() the JSON it read. All of it now goes when the call ends. From Codex's closing note on the Stage 4 review. Part of #1258.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1.0 #1275 +/- ##
=======================================
Coverage ? 93.21%
=======================================
Files ? 17
Lines ? 7048
Branches ? 0
=======================================
Hits ? 6570
Misses ? 478
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The test that moves a built project to a new directory compared the executable's modification time with a Sys.time() taken microseconds after the copy, and on two Windows runners the file came out newer by under a microsecond. Whether the executable is reused is a decision about the record, so the test now lives in test-model-rebuild-rules.R beside the renamed-program test, in that file's mocked shape: build once, rename the directory, and check that make is not called again. Part of #1258.
A WSL run takes about two hours and twenty minutes. Twice on 2026-09-17 a run stalled inside R CMD check with nothing printed, once until the runner lost contact after three hours and once until it was cancelled by hand after five. Without a job timeout a stalled run holds a runner for the six-hour default and prints no testthat output when it dies.
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 created with AI assistance. I have reviewed all code.
Every build copied the Stan program into the session's temporary directory and left the copy there, along with the C++ make generated from it and the executable it linked (the install copies the executable rather than moving it).
check_syntax_stan_file()left the C++ stanc wrote, and thestanc --inforun behind$variables()left the JSON it read. All of it now goes when the call ends.R removes the directory itself on a clean exit, so this only mattered for long sessions and for sessions that crash or are killed, whose directories stay. Two tests check that a build adds only the model's
$hpp_file()totempdir()and that a syntax check andvariables_stan_file()add nothing.This PR also gives CI a first run over the three commits pushed to
v1.0directly after #1273: thereadRDS()exposed-functions fix, the NEWS reflow and the test-directory tidy.Part of #1258.
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: