Skip to content

Commit 2d81b41

Browse files
authored
Merge pull request #471 from swiftlang/revert-434-EnableIncrementalScan
Revert "[Explicit Module Builds] Enable incremental dependency scanning"
2 parents 0a9c76a + 1ded61c commit 2d81b41

File tree

5 files changed

+0
-72
lines changed

5 files changed

+0
-72
lines changed

Sources/SWBCore/Settings/BuiltinMacros.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,6 @@ public final class BuiltinMacros {
10031003
public static let SWIFT_EMIT_MODULE_INTERFACE = BuiltinMacros.declareBooleanMacro("SWIFT_EMIT_MODULE_INTERFACE")
10041004
public static let SWIFT_ENABLE_BATCH_MODE = BuiltinMacros.declareBooleanMacro("SWIFT_ENABLE_BATCH_MODE")
10051005
public static let SWIFT_ENABLE_INCREMENTAL_COMPILATION = BuiltinMacros.declareBooleanMacro("SWIFT_ENABLE_INCREMENTAL_COMPILATION")
1006-
public static let SWIFT_DISABLE_INCREMENTAL_SCAN = BuiltinMacros.declareBooleanMacro("SWIFT_DISABLE_INCREMENTAL_SCAN")
10071006
public static let SWIFT_ENABLE_LAYOUT_STRING_VALUE_WITNESSES = BuiltinMacros.declareBooleanMacro("SWIFT_ENABLE_LAYOUT_STRING_VALUE_WITNESSES")
10081007
public static let SWIFT_ENABLE_LIBRARY_EVOLUTION = BuiltinMacros.declareBooleanMacro("SWIFT_ENABLE_LIBRARY_EVOLUTION")
10091008
public static let SWIFT_ENABLE_BARE_SLASH_REGEX = BuiltinMacros.declareBooleanMacro("SWIFT_ENABLE_BARE_SLASH_REGEX")
@@ -2165,7 +2164,6 @@ public final class BuiltinMacros {
21652164
SWIFT_EMIT_MODULE_INTERFACE,
21662165
SWIFT_ENABLE_BATCH_MODE,
21672166
SWIFT_ENABLE_INCREMENTAL_COMPILATION,
2168-
SWIFT_DISABLE_INCREMENTAL_SCAN,
21692167
SWIFT_ENABLE_LAYOUT_STRING_VALUE_WITNESSES,
21702168
SWIFT_ENABLE_LIBRARY_EVOLUTION,
21712169
SWIFT_USE_INTEGRATED_DRIVER,

Sources/SWBCore/SpecImplementations/Tools/SwiftCompiler.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ public struct SwiftSourceFileIndexingInfo: SourceFileIndexingInfo {
119119
"-emit-dependencies",
120120
"-serialize-diagnostics",
121121
"-incremental",
122-
"-incremental-dependency-scan",
123122
"-parseable-output",
124123
"-use-frontend-parseable-output",
125124
"-whole-module-optimization",
@@ -154,7 +153,6 @@ public struct SwiftSourceFileIndexingInfo: SourceFileIndexingInfo {
154153
// can be removed after we use the new driver instead (rdar://75851402).
155154
private static let newDriverFlags: Set<ByteString> = [
156155
"-driver-print-graphviz",
157-
"-incremental-dependency-scan",
158156
"-explicit-module-build",
159157
"-experimental-explicit-module-build",
160158
"-nonlib-dependency-scanner",
@@ -1745,10 +1743,6 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
17451743

17461744
if cbc.scope.evaluate(BuiltinMacros.SWIFT_ENABLE_INCREMENTAL_COMPILATION) {
17471745
args.append("-incremental")
1748-
if LibSwiftDriver.supportsDriverFlag(spelled: "-incremental-dependency-scan"),
1749-
!cbc.scope.evaluate(BuiltinMacros.SWIFT_DISABLE_INCREMENTAL_SCAN) {
1750-
args.append("-incremental-dependency-scan")
1751-
}
17521746
}
17531747
}
17541748

@@ -3291,8 +3285,6 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
32913285
for arg in [
32923286
// Should strip this because it saves some work and avoids writing a useless incremental build record
32933287
"-incremental",
3294-
// Same as above
3295-
"-incremental-dependency-scan",
32963288

32973289
// Stripped because we want to end up in single file mode
32983290
"-enable-batch-mode",

Tests/SWBBuildSystemTests/PreviewsBuildOperationTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,6 @@ fileprivate struct PreviewsBuildOperationTests: CoreBasedTests {
831831
"ENABLE_PREVIEWS": "YES",
832832
"CLANG_ENABLE_MODULES": "YES",
833833
"SDK_STAT_CACHE_ENABLE": "NO",
834-
"SWIFT_DISABLE_INCREMENTAL_SCAN": "YES",
835834

836835
"SWIFT_ENABLE_EXPLICIT_MODULES": explicitModules ? "YES" : "NO",
837836

Tests/SWBBuildSystemTests/SwiftDriverTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3616,7 +3616,6 @@ fileprivate struct SwiftDriverTests: CoreBasedTests {
36163616
"ENABLE_PREVIEWS": "YES",
36173617
"SWIFT_USE_INTEGRATED_DRIVER": useIntegratedDriver ? "YES" : "NO",
36183618
"SWIFT_ENABLE_EXPLICIT_MODULES": useIntegratedDriver ? "YES" : "NO",
3619-
"SWIFT_DISABLE_INCREMENTAL_SCAN": "YES",
36203619
"_EXPERIMENTAL_SWIFT_EXPLICIT_MODULES": useIntegratedDriver ? "YES" : "NO",
36213620
// Eager linking is not supported when using the driver binary.
36223621
"EAGER_LINKING": "NO",

Tests/SWBTaskConstructionTests/SwiftTaskConstructionTests.swift

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,6 @@ fileprivate struct SwiftTaskConstructionTests: CoreBasedTests {
646646
"SWIFT_PACKAGE_NAME": "FooPkg",
647647
"SWIFT_EMIT_MODULE_INTERFACE": "YES",
648648
"SWIFT_ENABLE_EXPLICIT_MODULES": "YES",
649-
"SWIFT_DISABLE_INCREMENTAL_SCAN": "YES",
650649
]),
651650
],
652651
buildPhases: [
@@ -832,7 +831,6 @@ fileprivate struct SwiftTaskConstructionTests: CoreBasedTests {
832831
"DEFINES_MODULE": "YES",
833832
"SWIFT_VERSION": swiftVersion,
834833
"SWIFT_EMIT_MODULE_INTERFACE": "YES",
835-
"SWIFT_DISABLE_INCREMENTAL_SCAN": "YES",
836834
]),
837835
],
838836
buildPhases: [
@@ -1537,64 +1535,6 @@ fileprivate struct SwiftTaskConstructionTests: CoreBasedTests {
15371535
}
15381536
}
15391537

1540-
@Test(.requireSDKs(.macOS), .enabled(if: LibSwiftDriver.supportsDriverFlag(spelled: "-incremental-dependency-scan")))
1541-
func optOutIncrementalScanning() async throws {
1542-
let testProject = try await TestProject(
1543-
"aProject",
1544-
groupTree: TestGroup(
1545-
"SomeFiles", path: "Sources",
1546-
children: [
1547-
TestFile("main.swift"),
1548-
]),
1549-
buildConfigurations: [
1550-
TestBuildConfiguration(
1551-
"Debug",
1552-
buildSettings: [
1553-
"PRODUCT_NAME": "$(TARGET_NAME)",
1554-
"SWIFT_ENABLE_EXPLICIT_MODULES": "YES",
1555-
]),
1556-
],
1557-
targets: [
1558-
TestStandardTarget(
1559-
"Exec", type: .commandLineTool,
1560-
buildConfigurations: [
1561-
TestBuildConfiguration("Debug",
1562-
buildSettings: [
1563-
"SWIFT_EXEC": swiftCompilerPath.str,
1564-
"SWIFT_VERSION": swiftVersion,
1565-
]),
1566-
],
1567-
buildPhases: [
1568-
TestSourcesBuildPhase([
1569-
"main.swift",
1570-
]),
1571-
])
1572-
])
1573-
let tester = try await TaskConstructionTester(getCore(), testProject)
1574-
1575-
await tester.checkBuild(runDestination: .macOS) { results in
1576-
results.checkTarget("Exec") { target in
1577-
results.checkTask(.matchTarget(target), .matchRuleType("SwiftDriver Compilation Requirements")) { task in
1578-
task.checkCommandLineContains(["-explicit-module-build"])
1579-
task.checkCommandLineContains(["-incremental"])
1580-
task.checkCommandLineContains(["-incremental-dependency-scan"])
1581-
}
1582-
}
1583-
results.checkNoDiagnostics()
1584-
}
1585-
1586-
await tester.checkBuild(BuildParameters(configuration: "Debug", overrides: ["SWIFT_DISABLE_INCREMENTAL_SCAN": "YES"]), runDestination: .macOS) { results in
1587-
results.checkTarget("Exec") { target in
1588-
results.checkTask(.matchTarget(target), .matchRuleType("SwiftDriver Compilation Requirements")) { task in
1589-
task.checkCommandLineContains(["-explicit-module-build"])
1590-
task.checkCommandLineContains(["-incremental"])
1591-
task.checkCommandLineDoesNotContain("-incremental-dependency-scan")
1592-
}
1593-
}
1594-
results.checkNoDiagnostics()
1595-
}
1596-
}
1597-
15981538
@Test(.requireSDKs(.macOS))
15991539
func swift4DisablesExplicitModules() async throws {
16001540
let testProject = try await TestProject(

0 commit comments

Comments
 (0)