Repository navigation
fix: format numbers with the current culture - #179
Merged
Merged
Conversation
- Align unhinted Single formatting with nullable values, hints, and parsing. - Generate numeric formatting with the same culture as runtime converters. - Set en-US as the shared TUnit culture and isolate French culture regressions. - Make converter test inputs and expectations follow the selected culture. - Demonstrate numeric formatting with a comma decimal separator. Closes #175
4 tasks done
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #179 +/- ##
==========================================
- Coverage 99.28% 99.28% -0.01%
==========================================
Files 403 403
Lines 15033 15032 -1
Branches 2229 2228 -1
==========================================
- Hits 14925 14924 -1
Misses 108 108 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
5 tasks done
glennawatson
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Numeric conversions now use the current culture consistently for defaults, format hints, and nullable values in both runtime converters and generated bindings.
floatformatting with the existing culture-aware numeric converters and parsing.en-US, with explicitfr-FRoverrides for culture regressions.Why
The default
SingleToStringTypeConverterused invariant culture while its hinted and nullable forms used current culture. Generated bindings repeated the exception, and converter tests combined locale-aware expectations with fixed dot-decimal text.Closes #175.
Breaking changes
Unhinted
floatformatting now followsCultureInfo.CurrentCulture. Applications relying on invariant float output should supply a conversion lambda or custom converter that explicitly usesCultureInfo.InvariantCulture. Public API signatures are unchanged.How this was verified
Regression tests cover both runtime flavours, nullable values, default and format-hint conversions, generated/runtime parity, and round-trip parsing under English and French cultures. Exercised the full solution build and TUnit suite with the shared culture, the whole runtime suite under both culture probes, and all configured managed examples; both modified production files have complete line and branch coverage.
Native AOT compilation reached native linking, which could not complete because this Windows host lacks
advapi32.lib. Linux and Apple execution were unavailable.Notes for the reviewer
The runtime and generator changes remove the same Single-specific exception. The shared test culture is generated as an assembly attribute from
Directory.Build.props; TUnit scopes explicit French overrides to their tests. Companion documentation: reactiveui/website#1005.This branch starts from
mainand is independent of #177; it contains none of that PR's property-raiser changes.Checklist