-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Feature custom-godot
: unchanged code is recompiled
#281
Comments
Do you mean commenting? because they are already currently uncommented. |
I meant "commenting-out". There should be an easier word in English 😬 |
i made a thing that seems to fix it which is basically just another crate that will update a version file if the godot version changes, and ffi and core just do rerun if changed on that. idk if that's what we actually want to do though. |
Is that more or less what we had before (the commented-out code here)? gdext/godot-bindings/src/godot_exe.rs Lines 33 to 38 in 8990464
The problem is that the code to read that file itself isn't run unless someone triggers it (so it would need to run |
No it's in a second crate, so we have godot-bindings
godot-version
godot-core
godot-ffi and in godot-version's build script we check the version and if it's mismatched we update it. since we don't emit a this does mean we need to run the build-script every build. but it's a very cheap build script to run as it only checks the contents of the file against the output of |
My PR over here should fix this issue as well: #469 |
Just to clarify, as already stated here and here, this issue is NOT fixed. The detection of Godot changes in presence of |
When using the feature
custom-godot
and compilingitest
, it looks like the cratesgodot-ffi
andgodot-core
are always recompiled, even if none of the code has changed.Commenting out both the following
cargo:rerun-if-changed
stops this from happening:gdextension_interface.h
headerinstead of disabling this, it's enough to only disable 2 of its callers:
Only turning either of the two main bullet points (or only one of the sub-points) does not do the job. So this could be a start to look for.
It also looks like
gdextension_interface.h
is added twice. This could be addressed as well; just make sure it still works withoutcustom-godot
.Maybe we can do what the library did originally: store the Godot version in a file and only run codegen when that changes. I also think auto-detecting Godot version changes isn't important, it's OK to expect a user to use
cargo clean
or similar. However, what's not OK is re-compiling entire unchanged crates for several seconds during incremental compilation.The text was updated successfully, but these errors were encountered: