-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The documentation for a class defined by the keyword 'class_name' does not appear when searching using the '(doc) Search Help' #86577
Comments
Probably a duplicate of: |
Facing the same issue.
|
This PR adds a script documentation cache in the project folder. It is loaded at alongside native documentation caches. This makes scripts fully accessible through Search Help, including their members, etc, right from project start, without having to compile every single script. Fixes godotengine#72406, fixes godotengine#86577.
This PR adds a script documentation cache in the project folder. It is loaded at alongside native documentation caches. This makes scripts fully accessible through Search Help, including their members, etc, right from project start, without having to compile every single script. Fixes godotengine#72406, fixes godotengine#86577.
This PR adds a script documentation cache in the project folder. It is loaded at alongside native documentation caches. This makes scripts fully accessible through Search Help, including their members, etc, right from project start, without having to compile every single script. Fixes godotengine#72406, fixes godotengine#86577.
I tested @nagidev's workaround on Recommend closing this as a duplicate and reopening later if found to behave different due to classes being in an addon. |
Tested versions
Reproducible in : 4.2.stable
System information
Godot v4.2.stable - Ubuntu 22.04.3 LTS 22.04 - X11 - Vulkan (Forward+) - dedicated Quadro M2000M (nvidia; 535.129.03) - Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz (8 Threads)
Issue description
The documentation for a class defined by the keyword 'class_name' does not appear when searching using the 'Search Help (doc)' bar located in the Workspace Script in the top-right corner of the script editor.
This documentation appears in the search bar the first time the file is loaded or the first time Godot is opened after modifying the file. Subsequent times, the class documentation is no longer suggested in the search bar.
Steps to reproduce
If you use the MRP (Minimal reproduction project), open the project and jump to the step 3.
Download the following repository :
git clone https://gitlab.com/Tomateauketchup/la-state-makina.git /tmp/la-state-makina
Create a new empty project with Godot as follows:
Set Version Control metadata to None.
(ignore the warnings saying that the directory is not empty)
If you want to resolve these errors, install the gdUnit4 asset.
But this is not important and not needed to reproduce the bug.
You should be able to open the SMStateMachine documentation, which should display correctly.
4 bis) (Optional) In the Godot editor, close all documentation, and scripts.
Quit the godot IDE.
Reopen the godot IDE.
If you didn't made the 4bis) operation, you should obtain the error :
"No loader found for resource: res://addons/la-state-makina/src/state_machine/sm_state_machine.gd (expected type: SMStateMachine)"
If you made the 4 bis) operation, you have no error.
The search toolbar should not suggest SMStateMachine.
This is a bug because we don't change anything in our project and the editor was able to display previously the documentation !
Quit the godot IDE.
Modify the source code with an external IDE (like vim) :
/tmp/la-state-makina/addons/la-state-makina/src/state_machine/sm_state_machine.gd
Add an empty line at the end of the file.
Reopen the godot IDE
Click on "Script" in the Workspace. In the top-right corner of the script editor, click on "Search Help," and enter "SMStateMachine."
Now, the search toolbar should suggest SMStateMachine, and you should be able to open the SMStateMachine documentation, which should display correctly.
11bis) (optional) In the Godot editor, close all scenes, documentation, and scripts.
Quit the godot IDE.
Reopen the godot IDE
If you didn't made the 11bis) operation, you should obtain the error :
"No loader found for resource: res://addons/la-state-makina/src/state_machine/sm_state_machine.gd (expected type: SMStateMachine)"
If you made the 11bis) operation, you have no error.
The search toolbar should no longer suggest SMStateMachine.
This is a bug, the editor was able to display previously the documentation.
Minimal reproduction project (MRP)
la-state-makina.zip
The text was updated successfully, but these errors were encountered: