[claude] Bump SIL.Harmony to rc.228 and fix config-time freeze - #2463
[claude] Bump SIL.Harmony to rc.228 and fix config-time freeze#2463myieye wants to merge 1 commit into
Conversation
rc.228 makes CrdtConfig.JsonSerializerOptions a lazy that freezes ChangeTypeListBuilder when built. The old code read it inside ConfigureCrdt before remote-resource change types were registered, throwing "ChangeTypeListBuilder is frozen". Move the JSON options finalization out of ConfigureCrdt into a single PostConfigure (runs after every Configure) so all change types are registered first; ConfigureCrdt is now pure type registration. Also update DataModelSnapshotTests to read change discriminators from the new synthetic $type property, since rc.228 drops built-in IChange PolymorphismOptions for a converter. The verified snapshot is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughUpdates Harmony package versions, changes CRDT JSON options finalization timing, moves remote resource registration, and revises change-model snapshot verification to derive polymorphic discriminators from concrete change types. ChangesCRDT JSON polymorphism and configuration
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
| var discriminatorProperty = _jsonSerializerOptions.GetTypeInfo(changeType).Properties | ||
| .SingleOrDefault(p => p.Name == CrdtConstants.ChangeDiscriminatorProperty); | ||
| discriminatorProperty.Should().NotBeNull("change type {0} should declare a $type discriminator", changeType); | ||
| var discriminator = discriminatorProperty!.Get!(RuntimeHelpers.GetUninitializedObject(changeType)); |
There was a problem hiding this comment.
we should probably make a helper function that does this, as I think we've done this in other places already and each one is a little different.
|
We want to make bigger changes on the Harmony side, so closing this. |
[Claude, autonomous]
Bumps SIL.Harmony 0.2.1-rc.211 → rc.228.
rc.228 makes
CrdtConfig.JsonSerializerOptionsa lazy that freezesChangeTypeListBuilderwhen built, so reading it insideConfigureCrdt(before remote-resource change types are registered) threwChangeTypeListBuilder is frozen. Moved the JSON-options finalization into a singlePostConfigurethat runs after everyConfigure;ConfigureCrdtis now pure type registration.DataModelSnapshotTests.VerifyChangeModelsnow reads change discriminators from the synthetic$typeproperty (rc.228 dropped built-inIChangePolymorphismOptionsfor a converter). Verified snapshot is byte-identical, so the registered change set and discriminators are unchanged — on-disk/wire format stays compatible.harmony-sentinel reviewed: no data-loss or format-compat risk (commit hash chain doesn't depend on change payload;
$typename/value/position unchanged).