-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Description
when set -Xfrontend -strict-implicit-module-context
on OTHER_SWIFT_FLAGS
to solve compile error, it did better for most scenarios, the relational pull request is #61919.
But in some case, it does not work as expected.
when we build a swift file which imports AModule
, the AModule
is a swiftinterface file;
in AModule
swiftinterface file which imports BModule
,the BModule
also is a swiftinterface file;
in BModule
swiftinterface file which imports a Clang Module, then we will get a No Such Module
compile error.
The reason of the error is when we create a sub-InterfaceSubContextDelegateImpl to build BModule
, the LoaderOpts. strictImplicitModuleContext
argument passed to su-astDeletate is false
not true
.
Steps to reproduce
1、download SwiftIssue demo
2、unzip
3、cd SwiftIssue && sh build.sh
Expected behavior
compile success
Environment
- Swift compiler version info 1.75.2 Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)
- Xcode version info Xcode 14.3 Build version 14E222b