Skip to content

Commit 540e17b

Browse files
committed
Use new Identifier type in ConvertAction/Indexer
1 parent 410efc3 commit 540e17b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Sources/SwiftDocCUtilities/Action/Actions/Convert/ConvertAction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public struct ConvertAction: AsyncAction {
276276
workingDirectory: temporaryFolder,
277277
fileManager: fileManager)
278278

279-
let indexer = try Indexer(outputURL: temporaryFolder, bundleIdentifier: bundle.id.rawValue)
279+
let indexer = try Indexer(outputURL: temporaryFolder, bundleID: bundle.id)
280280

281281
let context = try DocumentationContext(bundle: bundle, dataProvider: dataProvider, diagnosticEngine: diagnosticEngine, configuration: configuration)
282282

Sources/SwiftDocCUtilities/Action/Actions/Convert/Indexer.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ extension ConvertAction {
3232
/// Creates an indexer that asynchronously indexes nodes and creates the index file on disk.
3333
/// - Parameters:
3434
/// - outputURL: The target directory to create the index file.
35-
/// - bundleIdentifier: The identifier of the bundle being indexed.
36-
init(outputURL: URL, bundleIdentifier: String) throws {
35+
/// - bundleID: The identifier of the bundle being indexed.
36+
init(outputURL: URL, bundleID: DocumentationBundle.Identifier) throws {
3737
let indexURL = outputURL.appendingPathComponent("index", isDirectory: true)
3838
indexBuilder = Synchronized<NavigatorIndex.Builder>(
3939
NavigatorIndex.Builder(renderNodeProvider: nil,
4040
outputURL: indexURL,
41-
bundleIdentifier: bundleIdentifier,
41+
bundleIdentifier: bundleID.rawValue,
4242
sortRootChildrenByName: true,
4343
groupByLanguage: true
4444
)

Tests/SwiftDocCUtilitiesTests/ConvertActionIndexerTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ConvertActionIndexerTests: XCTestCase {
2929
let renderNode = try converter.convert(context.entity(with: reference))
3030

3131
let tempIndexURL = try createTemporaryDirectory(named: "index")
32-
let indexer = try ConvertAction.Indexer(outputURL: tempIndexURL, bundleIdentifier: bundle.id.rawValue)
32+
let indexer = try ConvertAction.Indexer(outputURL: tempIndexURL, bundleID: bundle.id)
3333
indexer.index(renderNode)
3434
XCTAssertTrue(indexer.finalize(emitJSON: false, emitLMDB: false).isEmpty)
3535
let treeDump = try XCTUnwrap(indexer.dumpTree())
@@ -54,7 +54,7 @@ class ConvertActionIndexerTests: XCTestCase {
5454
let renderNode2 = try converter.convert(context.entity(with: reference2))
5555

5656
let tempIndexURL = try createTemporaryDirectory(named: "index")
57-
let indexer = try ConvertAction.Indexer(outputURL: tempIndexURL, bundleIdentifier: bundle.id.rawValue)
57+
let indexer = try ConvertAction.Indexer(outputURL: tempIndexURL, bundleID: bundle.id)
5858
indexer.index(renderNode1)
5959
indexer.index(renderNode2)
6060
XCTAssertTrue(indexer.finalize(emitJSON: false, emitLMDB: false).isEmpty)

0 commit comments

Comments
 (0)