Skip to content

Commit 7d470c5

Browse files
author
David Ungar
authored
Fix bug when vendor is incremental and client is not (#460)
1 parent 1780e77 commit 7d470c5

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

Sources/SwiftDriver/IncrementalCompilation/ModuleDependencyGraphParts/Integrator.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,9 @@ extension ModuleDependencyGraph.Integrator {
219219
.contains(externalDependency)
220220
guard !isKnown else {return}
221221
if !isIncremental {
222-
destination.reporter?.report("found externalDependency",
223-
externalDependency.file)
222+
// Nice for debugging, but too much otherwise:
223+
// destination.reporter?.report("found externalDependency", externalDependency.file)
224+
224225
// no integration to do for these, so just remember them here
225226
destination.externalDependencies.insert(externalDependency)
226227
}
@@ -233,7 +234,7 @@ extension ModuleDependencyGraph.Integrator {
233234
aspect: .interface,
234235
designator: .externalDepend(externalDependency))
235236
let isNewUse = destination.nodeFinder.record(def: key, use: moduleUseNode)
236-
if !isNewUse {
237+
if isNewUse {
237238
destination.externalDependencies.insert(externalDependency)
238239
results.changedNodes.insert(moduleUseNode)
239240
}

Tests/SwiftDriverTests/IncrementalCompilationTests.swift

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,6 @@ final class IncrementalCompilationTests: XCTestCase {
454454
checkDiagnostics: checkDiagnostics,
455455
expectingRemarks: [
456456
"Disabling incremental cross-module building",
457-
"Incremental compilation: found externalDependency",
458-
"Incremental compilation: found externalDependency",
459457
"Incremental compilation: May skip current input: {compile: main.o <= main.swift}",
460458
"Incremental compilation: May skip current input: {compile: other.o <= other.swift}",
461459
"Incremental compilation: Skipping input: {compile: main.o <= main.swift}",
@@ -472,8 +470,6 @@ final class IncrementalCompilationTests: XCTestCase {
472470
checkDiagnostics: checkDiagnostics,
473471
expectingRemarks: [
474472
"Disabling incremental cross-module building",
475-
"Incremental compilation: found externalDependency",
476-
"Incremental compilation: found externalDependency",
477473
"Incremental compilation: May skip current input: {compile: main.o <= main.swift}",
478474
"Incremental compilation: Scheduing changed input {compile: other.o <= other.swift}",
479475
"Incremental compilation: Queuing (initial): {compile: other.o <= other.swift}",
@@ -499,8 +495,6 @@ final class IncrementalCompilationTests: XCTestCase {
499495
checkDiagnostics: checkDiagnostics,
500496
expectingRemarks: [
501497
"Disabling incremental cross-module building",
502-
"Incremental compilation: found externalDependency",
503-
"Incremental compilation: found externalDependency",
504498
"Incremental compilation: Scheduing changed input {compile: main.o <= main.swift}",
505499
"Incremental compilation: Scheduing changed input {compile: other.o <= other.swift}",
506500
"Incremental compilation: Queuing (initial): {compile: main.o <= main.swift}",
@@ -527,8 +521,6 @@ final class IncrementalCompilationTests: XCTestCase {
527521
checkDiagnostics: checkDiagnostics,
528522
expectingRemarks: [
529523
"Disabling incremental cross-module building",
530-
"Incremental compilation: found externalDependency",
531-
"Incremental compilation: found externalDependency",
532524
"Incremental compilation: Scheduing changed input {compile: main.o <= main.swift}",
533525
"Incremental compilation: May skip current input: {compile: other.o <= other.swift}",
534526
"Incremental compilation: Queuing (initial): {compile: main.o <= main.swift}",
@@ -564,8 +556,6 @@ final class IncrementalCompilationTests: XCTestCase {
564556
extraArguments: [extraArgument],
565557
expectingRemarks: [
566558
"Disabling incremental cross-module building",
567-
"Incremental compilation: found externalDependency",
568-
"Incremental compilation: found externalDependency",
569559
"Incremental compilation: May skip current input: {compile: other.o <= other.swift}",
570560
"Incremental compilation: Queuing (initial): {compile: main.o <= main.swift}",
571561
"Incremental compilation: scheduling dependents of main.swift; -driver-always-rebuild-dependents",

0 commit comments

Comments
 (0)