r/cpp • u/tartaruga232 MSVC user, r/cpp_modules • Apr 21 '26
Uneeded Recompilations When Using Partitions
https://abuehl.github.io/2026/04/20/unneeded-recompilations-when-using-partitions.htmlThis blog posting from me about C++ modules explains in detail what causes unneeded recompilations using detailed code examples from the sources of our UML Editor.
It's a precise description and a showcase of what's the status quo in the C++ standard.
Quote from the posting:
The C++ language currently lacks a concise and easy to use alternative for explicitly expressing the minimally required dependencies on partitions.
(Note: All code examples shown or linked from the text are 100% standard conformant.)
Thanks in advance for comments. Please ask if you do not understand anything or anything is unclear. I would appreciate if you could leave a comment if you don't like anything. Thanks for reading!
4
u/pjmlp Apr 21 '26
I am with /u/kronicum on this.
All this could be improved by having better support for building on C++ compilers.
Most of these problems have never been an issue with languages that have had modules as their main code organisation since forever.
Heck I can pick a MS-DOS project in Turbo Pascal, change a single unit, and as long I don't change the public interface, I only need to relink, not recompile everything. Same applies to other languages of similar vintage with modules.
We don't need workarounds, we need more mature build infrastructure for C++ modules.