question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[PROPOSAL] Write reload logic in cpp

See original GitHub issue

Currently 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:open
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
CedNarucommented, Jul 29, 2021

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.

0reactions
chippmanncommented, Mar 13, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

[PROPOSAL] Write reload logic in cpp · Issue #257 - GitHub
I propose that we implement this filewatching and reloading logic completely in cpp. Looking at the impl of some other cpp filewatching libs ......
Read more >
c++ need to refresh variable - arrays - Stack Overflow
i first wanted to get the program running the way i want it to(correct logic. I still want to, like you said, delegate...
Read more >
Dynamic C++ Proposal - CodeProject
A proposal of how to introduce dynamism into the C++ language.
Read more >
C++ Annotated September–October 2022: Kona ISO Meeting ...
With this proof of concept working successfully in the Cppfront compiler, Herb presents the updated version of the ISO C++ proposal paper.
Read more >
C++ Runtime Code Reload - Coding Labs
When we trigger the code reload the runtime reload module will recompile the DLL, unload the current one and link the new one...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found