Skip to content

Conversation

PoignardAzur
Copy link
Contributor

@PoignardAzur PoignardAzur commented Jul 24, 2025

Add ArenaMutList::item_mut_disjoint.
Add ArenaMutList::reparent.
Make ArenaMapMut an explicit part of the API.

Overall, the goal of this is to make reparenting possible while in the middle of iterating the widget tree.
This is a key part of the groundwork for the lifecycle refactor as described in #masonry > Plan for widget lifecycle.

@PoignardAzur
Copy link
Contributor Author

This is, obviously, not remotely close to compiling, since it changes the arena APIs without updating the Masonry code that uses them.

@KGrewal1 I'm uploading this because I'm especially interested in your take on this API so far. How feasible do you think it would be to make a sound version of this API on the unsafe side?

@KGrewal1
Copy link
Contributor

KGrewal1 commented Aug 4, 2025

apologies for taking so long to look at this

  • from looking the main benefit is the ability to get disjoint mutable access to the sub trees
  • I do not think this is unfeasible though in practice though may require rethinking the current API a bit - not sure how hard this would - the invariants for this should be stored in parents_map which is also in the safe version of the arena so the check for being disjoint in that should mirror over to disjoint in unsafe too, making this change easier

@PoignardAzur
Copy link
Contributor Author

apologies for taking so long to look at this

No worries.

That said, I'm on a pretty tight schedule (one week left). Any chance you'd have time for a video call? You can DM on zulip if so.

@PoignardAzur PoignardAzur marked this pull request as draft August 13, 2025 12:52
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.

2 participants