Fix Homebrew install: #1355
Conversation
…unavailable The Homebrew formula only ships toolchain/ and examples/ but not src/. The toolchain reads Fortran constants from src/common/m_constants.fpp at import time, causing a RuntimeError in Homebrew installs. Add fallback values for the 4 required constants so the toolchain works without the Fortran source tree.
Review Summary by QodoAdd fallback Fortran constants for Homebrew compatibility
WalkthroughsDescription• Add fallback Fortran constants for Homebrew installations • Prevents RuntimeError when src/common/m_constants.fpp unavailable • Maintains compatibility with incomplete Homebrew package distribution • Includes 4 required constants with documented sync requirement Diagramflowchart LR
A["get_fortran_constants()"] --> B["Parse m_constants.fpp"]
B --> C{"Constants found?"}
C -->|Yes| D["Return parsed constants"]
C -->|No| E["Use _FALLBACK_CONSTANTS"]
E --> F["Return fallback values"]
File Changes1. toolchain/mfc/params/namelist_parser.py
|
Code Review by Qodo
1. Fallback masks parse failures
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1355 +/- ##
==========================================
+ Coverage 64.85% 64.88% +0.03%
==========================================
Files 70 70
Lines 18228 18249 +21
Branches 1506 1507 +1
==========================================
+ Hits 11821 11841 +20
Misses 5446 5446
- Partials 961 962 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
add fallback constants when m_constants.fpp is unavailable
The Homebrew formula only ships toolchain/ and examples/, but not src/. The toolchain reads Fortran constants from src/common/m_constants.fpp at import time, causing a RuntimeError in Homebrew installs. Add fallback values for the 4 required constants so the toolchain works without the Fortran source tree.
AI code reviews
Reviews are not triggered automatically. To request a review, comment on the PR:
@coderabbitai review— incremental review (new changes only)@coderabbitai full review— full review from scratch/review— Qodo review/improve— Qodo code suggestions@claude full review— Claude full review (also triggers on PR open/reopen/ready)claude-full-review— Claude full review via label