Files
swift-mirror/test/ScanDependencies/diagnose_dependency_cycle.swift
Artem Chikin f45db99c04 [Dependency Scanning] Improve the cycle-detection diagnostic for Swift overlay dependencies
Add tracing of the underlying Clang module for an overlay dependency if said overlay dependency forms a cycle
2024-02-08 08:54:14 -08:00

11 lines
556 B
Swift

// RUN: %empty-directory(%t)
// RUN: mkdir -p %t/clang-module-cache
// RUN: not %target-swift-frontend -scan-dependencies -module-cache-path %t/clang-module-cache %s -o %t/deps.json -I %S/Inputs/CHeaders -I %S/Inputs/Swift -emit-dependencies -emit-dependencies-path %t/deps.d -import-objc-header %S/Inputs/CHeaders/Bridging.h -swift-version 4 &> %t/out.txt
// RUN: %FileCheck %s < %t/out.txt
// CHECK: module dependency cycle: 'CycleOne.swiftinterface -> CycleTwo.swiftinterface -> CycleThree.swiftinterface -> CycleOne.swiftinterface'
import CycleOne