Skip to content

LSP: Fix singleton registration#116369

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
HolonProduction:lsp/singleton
Feb 16, 2026
Merged

LSP: Fix singleton registration#116369
Repiteo merged 1 commit into
godotengine:masterfrom
HolonProduction:lsp/singleton

Conversation

@HolonProduction

Copy link
Copy Markdown
Member

Fixes #52162
Fixes #86132

The singleton is now registered on MODULE_INITIALIZATION_LEVEL_EDITOR instead of a late callback.

To make this work I removed an old test case that limited singletons to only types that inherit directly from Object. This should be fine based on my question on RC.

@Repiteo Repiteo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed in this rc thread, and I agree that singletons should not be constrained to Object alone (at least, not without it being explicitly documented as such).

Comment thread editor/doc/doc_tools.cpp

@Ivorforce Ivorforce left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.
I can't think of a reason to restrict to direct Object succession. It might just be leftover code from when it made more sense.

The rest of the changes also look good to me.

@Repiteo Repiteo merged commit 3769034 into godotengine:master Feb 16, 2026
20 checks passed
@Repiteo

Repiteo commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment