mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Diagnose modules with circular dependencies (#16075)
This can't arise from a clean build, but it can happen if you have products lingering in a search path and then either rebuild one of the modules in the cycle, or change the search paths. The way this is implemented is for each module to track whether its imports have all been resolved. If, when loading a module, one of its dependencies hasn't resolved all of its imports yet, then we know there's a cycle. This doesn't produce the best diagnostics, but it's hard to get into this state in the first place, so that's probably okay. https://bugs.swift.org/browse/SR-7483
This commit is contained in:
@@ -43,6 +43,10 @@ enum class Status {
|
||||
/// The module file is an overlay for a Clang module, which can't be found.
|
||||
MissingShadowedModule,
|
||||
|
||||
/// The module file depends on a module that is still being loaded, i.e.
|
||||
/// there is a circular dependency.
|
||||
CircularDependency,
|
||||
|
||||
/// The module file depends on a bridging header that can't be loaded.
|
||||
FailedToLoadBridgingHeader,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user