Error in Godot 4.8 dev due to removed method `GDScriptTextDocument::foldingRange`
- Dominant language
- Rust
- Stars
- 5.2k
- Forks
- 312
- Avg merge
- 12h 59m
- Merged PRs (30d)
- 9
Description
```
ERROR: [panic /home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/godot-ffi-0.5.5/src/toolbox.rs:342]
Failed to load class method GDScriptTextDocument::foldingRange (hash 3877611628).
Make sure gdext and Godot are compatible: https://godot-rust.github.io/book/toolchain/compatibility.html
in ExtensionLibrary::on_stage_init(Editor)
at: godot_core::private::install_godot_rust_hook::{{closure}} (/home/thomas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/godot-core-0.5.5/src/private.rs:331)
```
Looks like this was removed in https://github.com/godotengine/godot/pull/114533.
These methods (`codeLens`, `foldingRange` and `colorPresentation`) are for the LSP service and have always been stubs, so nobody would ever have been calling them from gdext. So I think it should be safe to outright remove them on the gdext side as well.
Starting on a patch now but not sure I'll have time to finish it, so here's an issue as a reminder :)
Contributor guide
Research direction
Search the gdext bindings for GDScriptTextDocument methods codeLens, foldingRange, and colorPresentation, then compare their use with Godot PR 114533 and the compatibility guidance. Done means the removed Godot methods no longer cause the extension library to fail during editor initialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- godot, rust
- Domain
- game-dev, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100