[PROPOSAL] Write reload logic in cpp
See original GitHub issueCurrently we have the bootstrap class which handles file system changes and reloads classes accordingly.
It basically is the sole reason why we have to ship the godot-bootstrap.jar
alongside the engine executable.
I propose that we implement this filewatching and reloading logic completely in cpp. Looking at the impl of some other cpp filewatching libs (like https://github.com/apetrone/simplefilewatcher/) we should be able to to this kind of filewatching ourselves pretty easily as well even if we have to implement it platform specific. Maybe even godot has some platform independent way of watching filesystem changes.
Also now that we use a buildLock file instead of watching the build
dir directly, the file watching logic is greatly simplified.
So we would in fact only need to watch one file which further simplifies things a lot.
This would pave the way for better/simpler editor builds and would completely remove the need for two jar files as we could pack everything into one jar. Which would also simplify export targets like android a lot.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
I’m pretty sure that Godot got some thread running in the editor to check if a file in the project was changed recently: https://github.com/godotengine/godot/blob/d5bd8a704f096043174af7994ef3de055a36cf45/editor/editor_file_system.cpp#L209. Need to investigate that more in details.
This issue is postponed until https://github.com/utopia-rise/godot-kotlin-jvm/milestone/9 is done