Conversation
There was a problem hiding this comment.
Pull request overview
Fixes the custom std::formatter specialization for mechanism_configuration::ErrorLocation to restore compatibility with older macOS toolchains while keeping std::format-based error messages working across compilers.
Changes:
- Replaces the previous
std::formatterimplementation with a specialization that definesparse()and a templatedformat()usingstd::format_to. - Removes the prior inheritance-based formatting approach (string-formatter delegation).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #253 +/- ##
=======================================
Coverage 70.00% 70.00%
=======================================
Files 5 5
Lines 10 10
=======================================
Hits 7 7
Misses 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| } // namespace mechanism_configuration | ||
|
|
||
| namespace std | ||
| template<> |
There was a problem hiding this comment.
My understanding is that we'd still need std namespace because we're specializing std::formatter to write line and column to the output.
There was a problem hiding this comment.
The line below this applies the namespace, so it's no longer needed struct std::.... I don't think it matters if the specialization is applied in the namespace or scoped as it is. Happy to change this if you would prefer
There was a problem hiding this comment.
Ah I missed that. Thank you, this looks good!
In JuliaPackaging/Yggdrasil#13280, I learned I had implemented the custom formatter incorrectly. This fixes the build for older versions of macos, but still seems to work with all other compilers