Skip to content

Improve lambda hotswapping when uniquely named#98221

Open
rune-scape wants to merge 3 commits intogodotengine:masterfrom
rune-scape:hotswap-named-lambdas
Open

Improve lambda hotswapping when uniquely named#98221
rune-scape wants to merge 3 commits intogodotengine:masterfrom
rune-scape:hotswap-named-lambdas

Conversation

@rune-scape
Copy link
Copy Markdown
Contributor

this PR makes lambda hotswapping more stable when lambdas are named, or when a lambda is the initializer for a member, variable, or parameter

+now all script member initializer lambdas can be swapped (between implicit_initializer, implicit_ready_info (@onready vars), and static_initializer)
+added the ability to test hot-reloading scripts and added tests :3
+anonymous lambdas include the name of the variable they initialize, <anonymous lambda(member_var)>
++this formatting is up for debate but it doesn't seem like it matters that much
++it, however, may be that adding the variable name to the anonymous lambda name is undesirable, seems fine to me but i wanted to point that out

i've split this into 2 commits that add the features needed to implement this, and then the actual change

partially fixes #97834

@rune-scape rune-scape requested review from a team as code owners October 16, 2024 08:35
@dalexeev dalexeev added this to the 4.4 milestone Oct 16, 2024
@AThousandShips AThousandShips changed the title Improved lambda hotswapping when uniquely named Improve lambda hotswapping when uniquely named Oct 16, 2024
@Repiteo Repiteo modified the milestones: 4.4, 4.5 Feb 24, 2025
@Repiteo Repiteo requested a review from vnen July 25, 2025 15:04
@Repiteo Repiteo requested a review from Chaosus August 20, 2025 17:26
@Repiteo Repiteo modified the milestones: 4.5, 4.6 Sep 8, 2025
@rune-scape rune-scape force-pushed the hotswap-named-lambdas branch from 20b2dce to fb65ad3 Compare September 16, 2025 17:47
@Repiteo Repiteo modified the milestones: 4.6, 4.x Nov 18, 2025
@rune-scape rune-scape force-pushed the hotswap-named-lambdas branch from fb65ad3 to 9809144 Compare January 31, 2026 07:52
@rune-scape rune-scape force-pushed the hotswap-named-lambdas branch from 9809144 to 361a1cc Compare February 24, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@export_tool_button breaks when changing the script contents (lambda hot-reloading)

3 participants