fix: Inspector property refresh on compilation errors (Phase 0 Week 1 Task 5) #60
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.
🐛 Bug Fix
Fixes Inspector showing stale properties after compilation errors.
Part of v0.0.5 Phase 0, Week 1, Task 5 - Quick win bug fix that improves developer experience.
📋 Problem
When a
.ferrisscript failed to compile, the Godot Inspector would continue showing properties from the last successful compilation. This created confusion because:✅ Solution
Added
clear_on_error()method that:program,env,script_loadedflag)notify_property_list_changed()Now when compilation fails in
load_script(), all three error paths callclear_on_error():🧪 Testing
Manual Testing Required
Test 1: Properties clear on compilation error
.ferrisscript with@exportpropertieslet x: i32 = "string")Test 2: Properties repopulate on fix
Test 3: Rapid edits
Test 4: Multiple scripts
.ferrisscript to different nodeTest 5: File not found
Automated Testing
📚 Documentation
docs/TROUBLESHOOTING.mdto mark issue as Fixed in v0.0.5notify_property_list_changed()is called on error🔍 Edge Cases Handled
🚀 Impact
User-Facing Benefits:
Developer Experience:
📝 Implementation Notes
notify_property_list_changed()pattern used for successful compilation🔗 Related
Ready for manual testing in Godot - all automated checks pass!