godot icon indicating copy to clipboard operation
godot copied to clipboard

Adding a doc comment to an already exported variable is not displayed until the project is reloaded

Open lufog opened this issue 3 years ago • 1 comments
trafficstars

Godot version

v4.0.alpha.custom_build [c81ef5150]

System information

Windows 11

Issue description

Pull request #62936 added display of doc comments in the inspector, but with a small problem. If you add a doc comment to an already exported variable, it does not appear until the project is reloaded. If you add a doc comment before the variable is exported, and then export it, the doc comment will be displayed immediately.

Upd: 77d3ac7 breaks the display of doc comments in the inspector.

Steps to reproduce

  • create variable and export it
  • add doc comment

Minimal reproduction project

No response

lufog avatar Aug 06 '22 12:08 lufog

If you add a doc comment to an already exported variable, it does not appear until the project is reloaded. If you add a doc comment before the variable is exported, and then export it, the doc comment will be displayed immediately.

That means that adding doc comments doesn't invalidate some cache that would trigger an inspector to update, and that https://github.com/godotengine/godot/pull/62936 wasn't a sufficient fix to begin with. Likely, there needs to be a patch for the GDScript module to execute notify_property_list_changed when you change doc comments.

Upd: 77d3ac7 breaks the display of doc comments in the inspector.

It only removed a hack that obfuscated the issue. I'm afraid we're going to find a few of these problems now that it's gone.

YuriSizov avatar Aug 06 '22 15:08 YuriSizov

Upd: https://github.com/godotengine/godot/commit/77d3ac700d5f528c0393d6aff1306e76f07b0d83 breaks the display of doc comments in the inspector.

This problem should be fixed in #64246, I will fix the current issue in another PR

Xwdit avatar Aug 10 '22 21:08 Xwdit

Per https://github.com/godotengine/godot/pull/64246#issuecomment-1228953314 still experiencing this issue after the fix.

adalinesimonian avatar Sep 23 '22 20:09 adalinesimonian

I can't reproduce this in 4.1.beta 33957aee6 (Linux), likely thanks to https://github.com/godotengine/godot/pull/71843.

Calinou avatar Jun 19 '23 23:06 Calinou

Agreed with that assessment :)

anvilfolk avatar Jun 20 '23 01:06 anvilfolk

Fixed by #71843.

akien-mga avatar Jun 20 '23 05:06 akien-mga