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

Reduce first import errors #22

Closed
wants to merge 1 commit into from
Closed

Reduce first import errors #22

wants to merge 1 commit into from

Conversation

manuq
Copy link
Contributor

@manuq manuq commented Jun 13, 2024

@manuq manuq force-pushed the initial-import-fix branch from a3d7f98 to 61bbd2e Compare June 13, 2024 19:12
@manuq manuq requested review from wnbaum, wjt and dylanmccall June 13, 2024 19:12
@manuq manuq marked this pull request as ready for review June 13, 2024 19:13
@manuq manuq changed the title WIP Reduce first import errors Jun 13, 2024
Copy link
Contributor

@wnbaum wnbaum left a comment

Choose a reason for hiding this comment

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

Good that these reduce a lot of errors, but I don't really like how hacky they are, and having to preload a bunch of scripts instead of having the global names is kind of unfortunate.

I found that in the .godot folder, there is a file named global_script_class_cache.cfg. If this file doesn't exist when the editor is opened and the plugin is enabled, there will be errors when the global classes are being referenced for the first time. If someone installs and enables this plugin normally, these errors do not occur.

So, if there is a way to un-ignore this .godot/global_script_class_cache.cfg file for developers only, that would be a way to fix the errors (which come from a developer opening the project without a .godot folder and specifically the mentioned file not being generated yet).

@manuq
Copy link
Contributor Author

manuq commented Jun 13, 2024

@wnbaum I think this is how other editor plugins are handling the current Godot bug. I borrowed from GDQuest Tour. See for reference: godotengine/godot#81615

I think we should merge this while the upstream bug persists.

@wnbaum
Copy link
Contributor

wnbaum commented Jun 13, 2024

Since this is only an issue for developers, and there's still a lot of errors happening that require a refresh I feel like we shouldn't merge yet.

Also, cloning the repository and adding the global_script_class_cache.cfg file wasn't actually enough to get rid of the errors. I had to copy the full .godot folder over. I think it's worth testing which files we need to include at some point.

But also if you really think it's worth it to merge then that's fine too :)

@manuq
Copy link
Contributor Author

manuq commented Jul 8, 2024

This is very out of date so closing.

@manuq manuq closed this Jul 8, 2024
@manuq manuq deleted the initial-import-fix branch August 5, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants