fix!: format a float with the invariant culture in the runtime converter, and build against ReactiveUI 25 by renovate[bot] · Pull Request #155 · reactiveui/ReactiveUI.Binding.SourceGenerators · GitHub
Skip to content

fix!: format a float with the invariant culture in the runtime converter, and build against ReactiveUI 25 - #155

Merged
glennawatson merged 5 commits into
mainfrom
renovate/major-reactiveui
Sep 28, 2026
Merged

glennawatson merged 5 commits into
mainfrom
renovate/major-reactiveui

Conversation

@renovate

@renovate renovate Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A float bound through the runtime converter now formats with the invariant culture, as a generated binding does, and the repository builds against ReactiveUI 25.

  • SingleToStringTypeConverter formats with the invariant culture when no hint is given. A generated float-to-string binding already did, so the runtime and generated paths now write the same text in every culture.
  • The repository references ReactiveUI 25.1.0 for its tests and examples.
  • The generator tests compile the System.Reactive flavour against ReactiveUI.Reactive, the package a System.Reactive consumer references.
  • WhenAnyValue on a ReactiveObject now resolves to this library, so its dispatch is generated and snapshotted.
  • The two benchmarks that measure ReactiveUI's own reflection engine stay on ReactiveUI 24.3.0, the last release that has it.
  • The concurrent view dispatch registration test starts its threads together at a barrier, so a registration that loses the race always retries. It used to cover the retry only when the runner happened to collide two threads.

Why

Renovate's bump to ReactiveUI 25 failed the test suite. ReactiveUI 25 takes its binding APIs and converters from this library, and lean ReactiveUI brings the lean runtime with it. The System.Reactive test compilations referenced lean ReactiveUI for ReactiveObject, so they mixed the two runtimes, which no consumer does.

The conversion parity tests now compare generated conversions with this library's converters, since those are the ones ReactiveUI registers. That showed SingleToStringTypeConverter used the current culture, while the generated binding and ReactiveUI 24's converter use the invariant culture. In a culture with a decimal comma, such as fr-FR, a runtime binding wrote 7,25 where a generated one wrote 7.25.

Breaking changes

SingleToStringTypeConverter returns invariant-culture text with no hint, such as 7.25 rather than 7,25 in fr-FR. An int or string hint formats as before. Code that relied on the current-culture default passes a format hint instead.

How this was verified

The converter tests cover the default under a comma-decimal culture, and the parity tests compare every standard conversion with its runtime converter in en-US and fr-FR. Ran ToPropertyVerification on net8.0 to net11.0 and the source generators documentation page.

Notes for the reviewer

Start with SingleToStringTypeConverter.cs, the only product change. The rest is test infrastructure: TestHelper.RuntimeReferences seeds each flavour from its own ReactiveUI package, and the scenario shifts in ReactiveRuntimeFlavourTests and SourceGeneratorsContractTests name ReactiveUI.Reactive.ReactiveObject for that flavour.

Checklist

  • I have read the Contribute guide
  • The PR title follows Conventional Commits
  • Tests cover this change, or the summary says why they do not
  • New or changed public API has XML documentation

…er, as generated bindings do

ReactiveUI 25 takes its converters from this library, so the parity tests now compare generated conversions with them. SingleToStringTypeConverter formatted with the current culture while the generated binding, and ReactiveUI 24's converter, use the invariant culture; the runtime converter now matches.

Build against ReactiveUI 25: the System.Reactive test compilations reference ReactiveUI.Reactive, which brings that flavour's runtime, as its consumers do. WhenAnyValue on a ReactiveObject now resolves to this library, so its dispatch is generated. The ReactiveUI engine benchmarks stay on ReactiveUI 24.3.0, the last release with that engine.
@glennawatson glennawatson changed the title chore(deps): update dependency reactiveui to v25 fix!: format a float with the invariant culture in the runtime converter, and build against ReactiveUI 25 Sep 28, 2026
@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

… a lost race always retries

ConcurrentRegistrations_AllTakeEffect relied on Parallel.For to collide two registrations, which a runner with few cores often did not, leaving the retry path of SetGeneratedViewDispatch uncovered on some runs. Each round now starts at least eight threads together at a barrier.
@sonarqubecloud

Copy link
Copy Markdown

@glennawatson
glennawatson merged commit 642e53b into main Sep 28, 2026
23 checks passed
@glennawatson
glennawatson deleted the renovate/major-reactiveui branch September 28, 2026 15:54
@github-actions

Copy link
Copy Markdown

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant