Commit 2ecf477
authored
fix: inline Fortran constant defaults in _fc() to prevent Homebrew sync failures (#1419)
* fix: inline Fortran constant defaults in _fc() to prevent Homebrew sync failures
Previously, _fc() raised if a constant was absent from _FALLBACK_CONSTANTS,
a separate dict that could silently drift from definitions.py. This caused
the v5.3.1 Homebrew build to fail: NIB = _fc('num_ib_patches_max') was added
to definitions.py but _FALLBACK_CONSTANTS was never updated, so every Homebrew
install hit a RuntimeError on startup.
Fix: _fc(name, default) now requires an inline default — the default lives
alongside the call, so they can't get out of sync. Remove _FALLBACK_CONSTANTS
and simplify get_fortran_constants() to return {} when src/ is unavailable.
* fix: restore drift detection in _fc() — raise when src/ is present but key is missing1 parent 462cac7 commit 2ecf477
2 files changed
Lines changed: 20 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
495 | | - | |
496 | | - | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
497 | 498 | | |
498 | 499 | | |
499 | 500 | | |
500 | 501 | | |
501 | 502 | | |
502 | 503 | | |
503 | | - | |
504 | | - | |
505 | 504 | | |
506 | 505 | | |
507 | 506 | | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | 507 | | |
519 | 508 | | |
520 | 509 | | |
| |||
0 commit comments