Commit e780856
committed
Commit cpp_options only on a real compilation
A dry run builds nothing, so it no longer records cpp_options_ or moves
hpp_file_; the latter previously pointed $hpp_file() at a temporary file
the dry run never wrote. exe_file_ and cmdstan_version_ stay in the tail,
commented as the deliberate exceptions: during a dry run they are also
the configured destination and the toolchain version, so they are
assigned on dry runs and on success but never on a failure.
cmdstan_version() is now evaluated into a local before any compilation
work rather than after the executable is installed. It is not infallible
despite being an accessor: set_cmdstan_path() stores PATH and VERSION
together, and when read_cmdstan_version() returns NULL the guard falls
through and leaves PATH set with VERSION NULL. In that state stanc and
make both run and only this call errors. It cannot be hoisted any
higher, since an ordinary no-op returns before ever reaching it and
would gain a failure mode it does not have today.
If discarding the staged candidate fails while another error is being
raised, the diagnostic now names the leftover path instead of implying
it was removed.
The two tests that asserted on $cpp_options() after a dry run move to
mocked successful compiles, and the header precedence test asserts that
the ignored spelling is dropped rather than retained.1 parent 6d634fc commit e780856
6 files changed
Lines changed: 99 additions & 27 deletions
File tree
- R
- man
- tests/testthat
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
43 | 67 | | |
44 | 68 | | |
45 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
| 499 | + | |
500 | 500 | | |
501 | 501 | | |
502 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
503 | 506 | | |
504 | 507 | | |
505 | 508 | | |
| |||
738 | 741 | | |
739 | 742 | | |
740 | 743 | | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
741 | 752 | | |
742 | 753 | | |
743 | 754 | | |
| |||
862 | 873 | | |
863 | 874 | | |
864 | 875 | | |
| 876 | + | |
865 | 877 | | |
866 | 878 | | |
867 | 879 | | |
| |||
871 | 883 | | |
872 | 884 | | |
873 | 885 | | |
874 | | - | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
875 | 891 | | |
876 | | - | |
877 | 892 | | |
878 | 893 | | |
879 | 894 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
306 | 317 | | |
307 | 318 | | |
308 | 319 | | |
| |||
317 | 328 | | |
318 | 329 | | |
319 | 330 | | |
320 | | - | |
321 | 331 | | |
322 | 332 | | |
323 | 333 | | |
| 334 | + | |
324 | 335 | | |
325 | 336 | | |
326 | 337 | | |
| |||
330 | 341 | | |
331 | 342 | | |
332 | 343 | | |
333 | | - | |
334 | 344 | | |
335 | 345 | | |
336 | 346 | | |
| 347 | + | |
337 | 348 | | |
338 | 349 | | |
339 | 350 | | |
340 | 351 | | |
341 | 352 | | |
342 | 353 | | |
343 | | - | |
| 354 | + | |
344 | 355 | | |
345 | 356 | | |
346 | 357 | | |
| 358 | + | |
347 | 359 | | |
348 | 360 | | |
349 | 361 | | |
| |||
352 | 364 | | |
353 | 365 | | |
354 | 366 | | |
| 367 | + | |
355 | 368 | | |
356 | 369 | | |
357 | 370 | | |
358 | 371 | | |
359 | 372 | | |
360 | 373 | | |
| 374 | + | |
361 | 375 | | |
362 | 376 | | |
363 | 377 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | 145 | | |
147 | 146 | | |
148 | 147 | | |
| |||
153 | 152 | | |
154 | 153 | | |
155 | 154 | | |
156 | | - | |
157 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
158 | 167 | | |
159 | 168 | | |
160 | 169 | | |
| |||
482 | 491 | | |
483 | 492 | | |
484 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
485 | 498 | | |
486 | 499 | | |
487 | | - | |
488 | | - | |
| 500 | + | |
| 501 | + | |
489 | 502 | | |
490 | 503 | | |
491 | | - | |
492 | | - | |
493 | | - | |
| 504 | + | |
| 505 | + | |
494 | 506 | | |
495 | 507 | | |
496 | 508 | | |
| |||
502 | 514 | | |
503 | 515 | | |
504 | 516 | | |
505 | | - | |
506 | | - | |
| 517 | + | |
| 518 | + | |
507 | 519 | | |
508 | 520 | | |
509 | | - | |
| 521 | + | |
510 | 522 | | |
511 | 523 | | |
512 | | - | |
513 | | - | |
| 524 | + | |
514 | 525 | | |
515 | 526 | | |
516 | 527 | | |
| |||
522 | 533 | | |
523 | 534 | | |
524 | 535 | | |
525 | | - | |
526 | | - | |
| 536 | + | |
| 537 | + | |
527 | 538 | | |
528 | 539 | | |
529 | | - | |
| 540 | + | |
530 | 541 | | |
531 | 542 | | |
532 | | - | |
533 | | - | |
| 543 | + | |
534 | 544 | | |
535 | 545 | | |
536 | 546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
| 695 | + | |
| 696 | + | |
695 | 697 | | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
696 | 701 | | |
697 | 702 | | |
| 703 | + | |
698 | 704 | | |
699 | 705 | | |
700 | 706 | | |
| |||
0 commit comments