-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
SCons: Separate module defines #99302
Conversation
How does this work if you e.g. disable the regex module? It won't generate |
Even if a module is disabled, the corresponding file will still generate. The difference is that the file's define will be commented out instead |
Hm it still breaks the modularity by making assumptions on the presence of the module folder. Modules can be third-party modules that are not included in this repo, and the engine code that may depend on such a module should still compile whether or not the module was present at build time. Likewise, uses should be able to I do like the gain in incremental rebuild times though, but I'm not sure how to achieve it in a clean way. |
I'm not completely married to this idea yet, that's part of why it's a draft. However, one immediate benefit is getting a handle on module dependencies & where some |
bc658ad
to
197d288
Compare
Ohh. This method is much more elegant than writing custom scons decider which I wanted to try! |
197d288
to
8fba81e
Compare
Alright, got a potential workaround: a short list of hardcoded module names. Basically, any module that can be explicitly used elsewhere in the repo is added to this list, so that the header file will generate even if the module itself is gone. It's a relatively short list, with only 17 out of 53 (~32%) modules being used in this manner, meaning a supermajority of modules are rather self-isolated HOWEVER. In doing this, I realized just how many modules are included in headers for core, editor, platform, and scene. As I understand it, all of these are breaking the dependency-order "rule". So this entire process is likely just introducing yet another workaround for what's actually a much larger issue: misordered dependencies. I'm gonna instead shift focus to making a hook which can detect these situations |
Superseded by #100023 |
One of the problems with the current implementation of modules is that any modification to them will cause every single script that references them to be recompiled. Even if the module being toggled isn't used in a given script, it referencing modules in any form will still flag them for recompilation. This PR addresses this concern by splitting the current
modules_enabled.gen.h
into individual files for each and every module. While this can make includes a bit more verbose, the benefits of significantly spedup compile times more than make up for itHere's two tests from identical starting points & how they handle disabling the
text_server_fb
module:Before - 02:50.81
After - 00:25.40