Skip to content

Commit 3da815a

Browse files
authored
Merge pull request #10030 from daveinglis/index_store_update
Use INDEX_ENABLE_DATA_STORE to control index operation while building
2 parents 74caf0c + b38766a commit 3da815a

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

Sources/SwiftBuildSupport/PackagePIFBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ public final class PackagePIFBuilder {
679679
debugSettings[.ENABLE_TESTABILITY] = "YES"
680680
debugSettings[.SWIFT_ACTIVE_COMPILATION_CONDITIONS, default: []].append(contentsOf: ["DEBUG"])
681681
debugSettings[.GCC_PREPROCESSOR_DEFINITIONS, default: ["$(inherited)"]].append(contentsOf: ["DEBUG=1"])
682-
debugSettings[.SWIFT_INDEX_STORE_ENABLE] = "YES"
682+
debugSettings[.INDEX_ENABLE_DATA_STORE] = "YES"
683683
builder.project.addBuildConfig { id in BuildConfig(id: id, name: "Debug", settings: debugSettings) }
684684

685685
// Add the build settings that are specific to release builds, and set those as the "Release" configuration.

Sources/SwiftBuildSupport/PackagePIFProjectBuilder+Products.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ extension PackagePIFProjectBuilder {
146146
settings[.SKIP_INSTALL] = "NO"
147147
settings[.SWIFT_ACTIVE_COMPILATION_CONDITIONS].lazilyInitialize { ["$(inherited)"] }
148148
// Enable index-while building for Swift compilations to facilitate discovery of XCTest tests.
149-
settings[.SWIFT_INDEX_STORE_ENABLE] = "YES"
149+
settings[.INDEX_ENABLE_DATA_STORE] = "YES"
150150

151151
if mainModule.platformConstraint == .host {
152152
// This is a macro test using prebuilts

Tests/SwiftBuildSupportTests/PIFBuilderTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -902,13 +902,13 @@ struct PIFBuilderTests {
902902
.buildConfig(named: configuration)
903903
switch indexStoreSettingUT {
904904
case .on, .off:
905-
#expect(targetConfig.settings[.SWIFT_INDEX_STORE_ENABLE] == nil)
905+
#expect(targetConfig.settings[.INDEX_ENABLE_DATA_STORE] == nil)
906906
case .auto:
907907
let expectedSwiftIndexStoreEnableValue: String? = switch configuration {
908908
case .debug: "YES"
909909
case .release: nil
910910
}
911-
#expect(targetConfig.settings[.SWIFT_INDEX_STORE_ENABLE] == expectedSwiftIndexStoreEnableValue)
911+
#expect(targetConfig.settings[.INDEX_ENABLE_DATA_STORE] == expectedSwiftIndexStoreEnableValue)
912912
}
913913

914914
let testTargetConfig = try pif.workspace
@@ -917,9 +917,9 @@ struct PIFBuilderTests {
917917
.buildConfig(named: configuration)
918918
switch indexStoreSettingUT {
919919
case .on, .off:
920-
#expect(testTargetConfig.settings[.SWIFT_INDEX_STORE_ENABLE] == nil)
920+
#expect(testTargetConfig.settings[.INDEX_ENABLE_DATA_STORE] == nil)
921921
case .auto:
922-
#expect(testTargetConfig.settings[.SWIFT_INDEX_STORE_ENABLE] == "YES")
922+
#expect(testTargetConfig.settings[.INDEX_ENABLE_DATA_STORE] == "YES")
923923
}
924924
}
925925
}

0 commit comments

Comments
 (0)