Commit c6536db
committed
Define the diagnostic-flag invariant by what cannot force a rebuild
Section 4 justified rejecting warn-pedantic from stanc_options partly on
the grounds that a supplied diagnostic evaporates the same way an
injected one does: build once, warn once, and never warn again once the
record matches. Read as a general rule that lands on --warn-uninitialized
and every other supplied diagnostic, and taken that way it asks for
stanc to be rerun on every construction of an up-to-date model.
The two cases are not the same. A compared option cannot evaporate in the
way that matters, because turning it on mismatches the record and
rebuilds; only an option that cannot force a rebuild needs a mechanism of
its own. So the invariant is narrower than "a diagnostic always
re-emits": asking for something you did not have before never yields
nothing. warn-pedantic satisfies it through section 8's rerun,
warn-uninitialized through being compared.
That leaves a real asymmetry on an identical repeat call, where pedantic
warns and a supplied diagnostic does not. Named rather than defended as
ideal. Buying it would mean cmdstanr knowing which stanc flags are
diagnostic-only per CmdStan version, which is the per-option semantics
canonicalization already declines, and a misclassification is silent in
the unsafe direction: treat a codegen flag as diagnostic and a needed
rebuild is skipped. It is also what a C compiler does with -W flags and
an up-to-date object file.
The warn-pedantic rejection now rests on the one-channel rule instead,
where pedantic is the case in which two channels differ in kind rather
than in spelling, one injected and uncompared and one supplied and
compared.1 parent 2c3c502 commit c6536db
1 file changed
Lines changed: 32 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
612 | 629 | | |
613 | 630 | | |
614 | 631 | | |
| |||
0 commit comments