We have moderately complex Swift project with around 2,000 Swift files in a
Most of the Swift source files are deeply nested inside directories and 90%
of these files have absolute paths with more than 150 characters (assuming
project is in "/Volumes/Macintosh HD2/Project" folder)
Because Swift compiler (Xcode 8.3.2) takes the absolute paths of all source
files while compiling, the ARG_MAX limit is reached and build fails with:
Build operation failed without specifying any errors. Individual build
tasks may have failed for unknown reasons.
One possible cause is if there are too many (possibly zombie) processes; in
this case, rebooting may fix the problem.
Some individual build task failures (up to 12) may be listed below.
Have anybody experienced this issue before?
We temporarily fixed this issue by renaming longer folder names to shorter
I'm assuming that breaking this monolithic module into smaller ones might
fix the issue, but are there any other better solutions?