Source build workflow

So, what’s the expected workflow when working with engine source build? I’ve been working with UE4 since the release and still can’t wrap my head around it

Just got fresh source for 4.23.1 and built it in Debug (had to trace something on engine side), associated my project with the source build and started building project (also in Debug) which resulted in 500 engine files recompilation, and these recompilation keep happening for me all the time.

Okay, so i found what i needed and now i need to build editor configuration to open the project and package it. I select Debug Editor and start to build, which result in over 2000 engine files recompilation. Why can’t it just reuse what it built before?

Am i missing something or is that just completely unfriendly workflow?

You need to define your custom BuildConfiguration.xml file, and reuse it across different build configurations.
that is what works for me to build only what is modified.

without build configuration file it’s hard to tell what UBT does, because even if just a single flag is chaned entry engine needs to be rebuilt.

with BuildConfiguration.xml fully set, UBT can’t do nothing but follow your rules meaning no need to rebuild.

my config file is 1K lines long (with comments of course) an left no compile option to UBT, so UBT has consistent build configuration no mater what I do with the solution, because UBT checks only for source file changes and compile flags to determine if it needs to compile and relink.

object fiiles have each its own directory, so changing configurations doesn’t delete them.
I still have no tested how would changing git branches work.

If you change build type then it obviously will need to rebuild the code, aspecially if you gonna do this for first time. If you have engine from source, engine it self becomes part of your project, this is actually how it normally should be as engine is part of your game and your module is just added to the rest of engine modules (so yea technically you extending the engine), so any build configuration changes will effect the engine itself.

Note that debug build is only needed for debuging variables as this build don’t optimize them away (like for example using CPU registers for short term local varbales, debugger can not see those), if you just want to trace just execution path then PDB file for development build is sufficient. There also DebugGame build which should builld only with debug menus

UBT have a option to build single module in commend line i think -module option, but i didnt play around with it. But this will throw errrors if you change something that needs engine code rebuild to link.