Module Compilation Order

I am currently trying to get into Unreal. It has been quite some time since I have written C++ code, my recent years were mainly C# for Unity. However, my company wants to diversify, so we decided to add Unreal to our portfolio.

We have a simple 5.3 “training” project, but I also want to start developing a suite of classes, functions and systems that can be reused in later projects, so I decided to put this stuff into a module. I followed the documentation and tutorials I found on that topic, and it mostly works, but I have a fundamental issue that makes working with this module suboptimal: for some reason, the build process does not build my module before the main module of the game, even though it is set as a dependency in the build.cs, both target.cs files, and the .uproject.

This means that whenever I add any function in the module and reference that outside the module, it doesn’t compile. If I remove the reference to the newly added symbol, I can compile again, and after that initial compilation I can add the reference again and compile it as a whole.

While this would be a workaround I could personally live with, it doesn’t work when more than a single person works on the project. The only other hack I found, that doesn’t include temporarily removing references, was deleting the “binaries” folder, which involves closing and reopening the Editor.

Is there something I am missing? Something the documentation doesn’t tell me? How can I force the engine to compile my module first?

Edit: Further testing revealed that I apparently only need to press compile twice. The first one will fail, the second will succeed. Acceptable, but seems unpolished for an engine so established…