godot-rust / godot-rust/gdext

Error in Godot 4.8 dev due to removed method `GDScriptTextDocument::foldingRange`

Closed
#1,699 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.