Repository navigation
Conversation
`positioned` replaced the column writer with `redefine_method` so that any assignment marks the column as changed. A writer defined in the model after `positioned` (the usual place for methods) replaced ours in turn, so assigning the same position a record already had while moving it to a new scope no longer counted as an explicit position and the record went to the end of the new scope instead. A writer defined before `positioned` was silently discarded. Define our writer in an included module instead, so a model's own writer can call super to reach it, whichever order they're declared in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
positionedreplaces the column writer withredefine_methodso that any assignment marks the column as changed (the 0.1.2 fix for assigning the same position while changing scope). That doesn't compose with a writer defined in the model:positioned(the usual place for methods), the model's writer replaces ours and the forced change is lost. Moving a record to a new list with the same position number it already had sends it to the end instead:[3, 1, 2]instead of[1, 2, 3]in the new test;positioned, the model's writer is silently discarded.Fix
Define our writer in a module included into the model, so the model's own writer can call
superto reach it, whichever order they're declared in.Changelog: A position writer defined in the model now composes with positioning's via
super.🤖 Generated with Claude Code