Skip to content
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

GDExtension: Fix missing library path breaking hot reloading #90961

Merged

Conversation

Lateasusual
Copy link
Contributor

@Lateasusual Lateasusual commented Apr 20, 2024

GDExtension::open_library was forgetting to set library_path for the extension, which was causing has_library_changed() to always return true (reading the modification time of the root directory instead of the library path) and reloading libraries every time the editor focus changed even if the file was not modified, causing huge slowdowns.

@Lateasusual Lateasusual requested a review from a team as a code owner April 20, 2024 20:11
@akien-mga akien-mga added this to the 4.3 milestone Apr 20, 2024
Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

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

Good catch, thanks!

It looks like I missed this in my review of PR #87117: we used to pass &library_path into OS::open_dynamic_library() which would lead to it getting set, but now its being stored in an intermediate variable, so we need to explicitly set it.

@akien-mga akien-mga merged commit e227432 into godotengine:master Apr 22, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

@Lateasusual Lateasusual deleted the gdextension-hot-reloading-borked branch April 23, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants