-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Fix @export_category
interfering with property tooltips
#76147
Conversation
cc @anvilfolk |
Oh, very interesting! I can't take a deeper look right now, but the idea behind the first fix sounds really cool!!! I'm not super sure on the second one. When is |
AFAICT But I think you're right and it's invalidating the benefit of these particular caches. I'll dig around to find better spot(s) to clear them out. EDIT: Landed on clearing them when the node to inspect changes ( |
211a6e5
to
c88deee
Compare
Gave this a tiny little bit more thought - sorry it's taking a while, life has been hectic lately :) So I suspect that #71843 is the better solution to #63997, of which I think #70217 is partially a duplicate. Instead of clearing the cache completely, it simply stops caching doc information that comes from GDScripts. This means that the cache works fully with the static documentation like GDScript stuff is then always obtained from I haven't gotten around to testing the other fix in this PR, since that part of the code can be pretty subtle! But I love the simplicity of it 🥳 How much testing have you managed to do on it? Would you be able to check that e.g. resource docstrings still work? And can we be 100% certain that I'll try to get some more testing done myself, time is just hard to come by atm! :) |
So I really want to test this but it's too much of a bother right now with having to restart the entire project every time you change docstrings so they update properly. #71843 fixes this but hasn't been accepted yet - I will come back to this once that's merged :) |
It was merged ;) |
I see what you did there ;) I will try to find some time to re-review this one sometime this week hopefully if I manage to catch up on class reading materials :) |
The caching issue should be resolved in |
Correct! At this point the only outstanding issue should be the category issue, which I will attempt to test :) It's a single-line fix :) |
The cache changes should be removed I looked into what |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as the cache lines are removed, as @KoBeWi said, this fixes the issue.
The PR description is correct: there's no reason that a custom category should attempt to set doc_name
, which is used to index where documentation can be found. That should be set once, when the script's own category is evaluated.
I couldn't find any regressions when using zero, one or multiple categories, or with the remaining categories, e.g. Node
.
@emr4378, can you make these changes? :)
Looks like there is unaddressed feedback in the discussion above. @emr4378 Are you still interested in contributing? This needs a rebase too. |
I'd say if someone with privileges for it wanted to amend this commit leaving only the removal of the |
@export_category
interfering with property tooltips
c88deee
to
992d678
Compare
Don't assume the category name can be used as the `doc_name`. Just leave it blank so it can be properly determined later on just before looking up cached doc info. Fixes godotengine#64432.
992d678
to
d3cdcd1
Compare
I updated this PR myself as advised by @anvilfolk, as OP seems to be inactive. Should be ready to merge now. |
I wanted to wait for #82051 to be merged to make sure this still behaves as expected afterwards. It's probably fine, but the code related to all these class and doc names is not straightforward so I wanted to be sure. |
So I wanted to confirm the bug again to test the fix, and the bug seems already fixed since 4.2-dev5. Weird. |
@dalexeev Is this one line change still worth doing for good measure, or would risk introducing other issues? |
I haven't tested this yet, but I suspect the change may break tooltips for native classes. I'll reply later. |
Thanks for the contribution nonetheless! |
Oh, damn, great catch @dalexeev, I had focused on testing GDScript classes! Glad you came along ❤️ |
Fixes #64432
Don't assume the category name can be used as the doc_name. Just leave it blank so it can be properly determined later on just before looking up cached doc info.
Fixes (not) #63997update_tree() populates description-related caches, but nothing was ever clearing them out so they'd forever hold onto the first description seen.