Skip to content

tests: widgets_datepicker_* tests now run#11130

Merged
ogoffart merged 2 commits intoslint-ui:masterfrom
0x6e:feature/fix-datepicker-test
Apr 1, 2026
Merged

tests: widgets_datepicker_* tests now run#11130
ogoffart merged 2 commits intoslint-ui:masterfrom
0x6e:feature/fix-datepicker-test

Conversation

@0x6e
Copy link
Copy Markdown
Collaborator

@0x6e 0x6e commented Mar 25, 2026

The Rust code block for the Rust test driver was missing a closing "```" which meant that the test was not being run.

@0x6e 0x6e enabled auto-merge (rebase) March 25, 2026 18:10
Copy link
Copy Markdown
Member

@LeonMatthes LeonMatthes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦 Thanks for finding this!

@0x6e
Copy link
Copy Markdown
Collaborator Author

0x6e commented Mar 25, 2026

Looks like some things need fixing…

@0x6e 0x6e force-pushed the feature/fix-datepicker-test branch from 01a93a0 to c52c631 Compare March 30, 2026 13:47
@0x6e
Copy link
Copy Markdown
Collaborator Author

0x6e commented Mar 30, 2026

Rebased... I couldn't reproduce the CI failure locally.

@0x6e
Copy link
Copy Markdown
Collaborator Author

0x6e commented Mar 30, 2026

Looks like I need to try harder...

@0x6e 0x6e disabled auto-merge March 30, 2026 20:25
@0x6e 0x6e marked this pull request as draft March 30, 2026 20:27
@0x6e
Copy link
Copy Markdown
Collaborator Author

0x6e commented Mar 30, 2026

I haven't fully understood the patch that Claude came up with, it's late... but wanted to see what the CI said.

0x6e and others added 2 commits March 31, 2026 13:41
The Rust code block for the Rust test driver was missing a closing
"```" which meant that the test was not being run.
When link_two_way_with_map_to_common_property replaces a property's
binding, it must transfer the dependency list from the old binding's
BindingHolder back to the property handle. Previously, the handle was
simply set to 0, orphaning the dependency list. When the old binding
was later freed via BindingMapper::drop, the BindingHolder.dependencies
(Cell<usize>) received a trivial drop instead of a proper
DependencyListHead::drop, leaving DependencyNodes with dangling prev
pointers that caused a debug_assert panic on drop.

Extract a detach_binding() helper on PropertyHandle that transfers the
dependency list from a binding back to the handle without dropping the
binding — the dependency-transfer portion of remove_binding(), also
handling the CONSTANT_PROPERTY_SENTINEL case. Refactor remove_binding()
to use detach_binding() + vtable.drop, and call detach_binding() in
link_two_way_with_map_to_common_property before replacing the binding.

Add a regression test that arranges drop order so a PropertyTracker's
dependency node outlives the old binding, which would trigger a panic
in DependencyNode::debug_assert_valid without the fix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@0x6e 0x6e force-pushed the feature/fix-datepicker-test branch from 6bea244 to b4f6818 Compare March 31, 2026 13:41
@0x6e 0x6e marked this pull request as ready for review March 31, 2026 14:45
@0x6e 0x6e requested a review from LeonMatthes March 31, 2026 14:45
@0x6e
Copy link
Copy Markdown
Collaborator Author

0x6e commented Mar 31, 2026

I've reviewed Claude's patch, requested some changes and added a test.

@tronical tronical requested a review from ogoffart March 31, 2026 14:50
@ogoffart ogoffart added this to the 1.16 milestone Apr 1, 2026
Copy link
Copy Markdown
Member

@ogoffart ogoffart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, nice find.

@ogoffart ogoffart merged commit c5fa49d into slint-ui:master Apr 1, 2026
45 checks passed
@0x6e 0x6e deleted the feature/fix-datepicker-test branch April 17, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants