mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This failure will most-likely result in the dependency query failure which will fail the scan. It will be helpful if the scanner emitted diagnostic for each such module it rejected to explain the reason why. Resolves rdar://142906530
14 lines
591 B
Swift
14 lines
591 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: mkdir -p %t/clang-module-cache
|
|
// RUN: mkdir -p %t/moduleInputs
|
|
|
|
// RUN: echo "Not Really a module" >> %t/moduleInputs/FooBar.swiftmodule
|
|
|
|
// RUN: %target-swift-frontend -scan-dependencies -module-cache-path %t/clang-module-cache %s -o %t/deps.json -I %t/moduleInputs -diagnostic-style llvm -scanner-module-validation 2>&1 | %FileCheck %s
|
|
|
|
import FooBar
|
|
|
|
// CHECK: warning: module file '{{.*}}{{/|\\}}moduleInputs{{/|\\}}FooBar.swiftmodule' is incompatible with this Swift compiler: malformed
|
|
// CHECK: error: Unable to find module dependency: 'FooBar'
|
|
|