-
Notifications
You must be signed in to change notification settings - Fork 101
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
CLI script that creates/updates .godot/global_script_class_cache.cfg #629
Comments
This is probably bad form but I couldn't think of better way of getting some good eyes on this. Sorry in advance. If I tagged you then you either had issues with |
Seems interesting but could be more convenient maybe with a folder instead of a list of script paths (I think when you said it could scan the whole projet that's the idea). Here the list of relevant issues in Godot side for the sake of tracking: Seems also ther is an |
I agree with @m21-cerutti that it will be mutch better to be able to specify the directory to scan, rather than individual files, one by one. For bigger projects there may be a huge amount of scripts with I also feel like this script is actually a hacky approach to solve godot-typical behavior. We shouldn't consider this as Gut issue (I know that my original issue #589 might have sound like it's gut problem, but turned out to be Godot specific thing). For now I'm happily using But I can see one reason to use the standalone updater script: When I run the |
This is good feedback. I wasn't sure how well/reliable the I'm going to abandon further development for now. I'll leave the branch out there for a bit, just in case something changes. If development continues, I think the addition of scanning directories would be good. Thanks everyone. |
Maybe you can put the script into assets or as an snipped by itself? if it helps to generate this file generating it faster, maybe makes sense to keep it. (only an idea) |
I'm looking for feedback on a standalone script I created to generate/update the global script class cache config file that seems to be a point of contention when running tests through a CI/CD pipeline. Any and all feedback is appreciated. I'm not even sure if this is needed, but it felt like it was.
This script is meant to replace having to load the project once
godot --headless --import
or having to have.godot/global_script_class_cache.cfg
under source control.The script takes a list of scripts to create class_name entries for. It will parse all the info to create the entries from the script itself. You just have to tell it which scripts have
class_name
in them. It will then create/update.godot/global_script_class_cache.cfg
without having to load the project.The script knows about all the GUT scripts that need to be added/updated. You only have to add any of your own scripts or the scripts of other plugins.
Maybe later it can just scan the whole project instead of having to be told.
The related code can be found in the (global_class_cache_updater)[https://github.com/bitwes/Gut/tree/global_class_cache_updater] branch.
global_script_class_cache_updater.gd
to parse options. This has been updated frommain
.Script help:
The text was updated successfully, but these errors were encountered: