Description
FBLPromises' module map fails to build under Xcode's newer Clang toolchain (Xcode 26/27 beta, iOS 27 SDK) when Explicitly Built Modules are enabled. The module map declares an umbrella header and an explicit list of the sibling headers in the same directory, which the newer Clang rejects.
Error
.../checkouts/promises/Sources/FBLPromises/include/module.modulemap:2:21:
error: umbrella for module 'FBLPromises' already covers this directory
The error is fatal to Clang dependency scanning, so every module that transitively imports FBLPromises (e.g. via Firebase) then fails with could not build module 'FBLPromises' and a cascade of Compilation search paths unable to resolve module dependency errors.
Environment
- Xcode: 26/27 beta (iPhoneSimulator 27.0 SDK)
- Integration: Swift Package Manager
- Build mode: Explicitly Built Modules enabled (
-explicit-module-build)
- Promises version:
Root cause
Sources/FBLPromises/include/module.modulemap declares an umbrella header together with an explicit list of header entries for files that live in the same directory the umbrella already covers:
module FBLPromises {
umbrella header "FBLPromises.h"
header "FBLPromise.h"
header "FBLPromise+All.h"
// ... all the other FBLPromise+*.h headers ...
exclude header "FBLPromisePrivate.h"
export *
}
An umbrella header already covers the whole directory. Re-declaring the sibling headers explicitly makes Clang see the directory as covered twice. Older Clang tolerated this; the newer toolchain treats it as an error.
Suggested fix
Drop the redundant explicit header entries and keep the umbrella plus the exclude for the private header:
module FBLPromises {
umbrella header "FBLPromises.h"
exclude header "FBLPromisePrivate.h"
export *
}
The umbrella header already imports every public FBLPromise+*.h, so the explicit list only duplicated coverage. The exclude is still required so FBLPromisePrivate.h (which sits in the covered directory) isn't pulled into the module.
Steps to reproduce
- Integrate Firebase (or Promises directly) via SPM.
- Build with Xcode 26/27 beta with Explicitly Built Modules enabled.
- Observe the
umbrella ... already covers this directory error and the downstream could not build module cascade.
Workarounds
- Patch the module map as above (not durable — the SPM checkout is regenerated on re-resolution).
- Disable Explicitly Built Modules (
SWIFT_ENABLE_EXPLICIT_MODULES = NO).
Description
FBLPromises' module map fails to build under Xcode's newer Clang toolchain (Xcode 26/27 beta, iOS 27 SDK) when Explicitly Built Modules are enabled. The module map declares anumbrella headerand an explicit list of the sibling headers in the same directory, which the newer Clang rejects.Error
The error is fatal to Clang dependency scanning, so every module that transitively imports
FBLPromises(e.g. via Firebase) then fails withcould not build module 'FBLPromises'and a cascade ofCompilation search paths unable to resolve module dependencyerrors.Environment
-explicit-module-build)Root cause
Sources/FBLPromises/include/module.modulemapdeclares an umbrella header together with an explicit list ofheaderentries for files that live in the same directory the umbrella already covers:An
umbrella headeralready covers the whole directory. Re-declaring the sibling headers explicitly makes Clang see the directory as covered twice. Older Clang tolerated this; the newer toolchain treats it as an error.Suggested fix
Drop the redundant explicit
headerentries and keep the umbrella plus theexcludefor the private header:The umbrella header already imports every public
FBLPromise+*.h, so the explicit list only duplicated coverage. Theexcludeis still required soFBLPromisePrivate.h(which sits in the covered directory) isn't pulled into the module.Steps to reproduce
umbrella ... already covers this directoryerror and the downstreamcould not build modulecascade.Workarounds
SWIFT_ENABLE_EXPLICIT_MODULES = NO).