Make unit relation ordering culture-invariant#1688
Conversation
Extracted from #1544 (#1544) because deterministic code generation is independent of the QuantityValue feature and improves the existing generator on its own. Moving it out reduces the size and conflict surface of the original PR. Changes: - Deserialize relation definitions without relying on SortedSet's current-culture comparer. - Normalize relations with an ordinal, case-insensitive immutable sorted set before parsing and rewriting the file. Tests: - No test cases changed; verified by running the full code generator and confirming it produced no unrelated generated-file changes.
ReviewSmall, well-scoped change to The fix itself is correct and worth having. Good choice using One subtlety worth a sentence in the PR description (low severity): Style-wise this matches the codebase conventions (using directives correctly ordered, nullable-friendly, adds the missing trailing newline). No test coverage was added, but that matches the existing pattern for Nothing else stands out — no performance or security concerns given this only runs at code-gen/build time over a local JSON file. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1688 +/- ##
======================================
Coverage 96% 96%
======================================
Files 456 456
Lines 30107 30107
======================================
Hits 29043 29043
Misses 1064 1064
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Extracted from #1544 because deterministic code generation is independent of the QuantityValue feature and improves the existing generator on its own. Moving it out reduces the size and conflict surface of the original PR.
Changes:
Tests: