Commit dabd759
committed
Keep format() but stop it refreshing the snapshot
format(overwrite_file = TRUE) rewrites the Stan file and then reassigns
stan_code_ and clears variables_, so both accessors end up describing a source
the executable was never built from. That is #1228's failure in the opposite
direction. The refresh was added deliberately in #1235, under the older contract
where code() meant the file as it is now, and the accessors have since been
redefined without it catching up.
Deleting those lines is the whole fix, so the method stays and keeps overwriting.
A reviewer proposed removing it; rewriting the file is the useful part and is not
what breaks anything. Afterwards the file changes, the snapshot keeps describing
the built source, and the next operation that runs the binary errors and points
at cmdstan_model(). Reformatting therefore forces a recompile, which is correct:
the bytes changed, and whether the build is unaffected cannot be known without
doing it.
Also adds a NEWS reconciliation pass before the release candidate. The unreleased
section already carries fifteen-plus entries about $compile(), compile = FALSE
and dry_run that stage 4 deletes, and one describing the format() refresh this
commit reverses. Such entries are removed rather than annotated, since a user
upgrading from 0.9 never saw the intermediate behaviour.1 parent e39fd0b commit dabd759
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
715 | 732 | | |
716 | 733 | | |
717 | 734 | | |
| |||
1181 | 1198 | | |
1182 | 1199 | | |
1183 | 1200 | | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
1184 | 1216 | | |
1185 | 1217 | | |
1186 | 1218 | | |
| |||
0 commit comments