Can too many source files break the build system? (4.8)

Reposting this (Can too many source files break the build system? - C++ - Epic Developer Community Forums), not to be a pain in the rear, but because it is still a real problem in Unreal Engine 4.8. I’m experiencing compilation errors after adding source files to my project, starting with the 30th one. The errors could be resolved by maintaining unique names, but it seems to me that when anonymous namespacing doesn’t work then there is a more dire programmatical problem at hand. As always, any tips are greatly appreciated.

We recently ran into this same issue on our project. It seems to be due to the unity build system that kicks in once your project reaches a certain size. The limit is currently set to 32 files and is declared in UnrealBuildTool’s BuildConfiguration.cs as MinGameModuleSourceFilesForUnityBuild.

To get around the issue the unity build can be disabled by adding “bFasterWithoutUnity = true;” to your constructor in the Project.Build.cs file.

The other alternative is to make sure you have unique function definitions across all anonymous namespaces in your project. We took the “disable unity builds” approach.