cartographer
cartographer copied to clipboard
Plugin class_name type hints and singleton dependency loop
Describe the bug When you have a class in a plugin that depends on a Singleton loaded by that plugin (with add_autoload_singleton) you can end up in a dependency loop very easily. See: https://github.com/godotengine/godot/issues/42651
To Reproduce Steps to reproduce the behavior:
- Create a plugin.
- Use
add_autoload_singleton
in the class to load a singleton. - Create a class that depends on the singleton.
- Use that class as a type hint in the plugin script.
Minimal reproduction project: plugin_class_singleton_dep_loop.zip
Related: #2 #5 #7