Skip to content

Commit e4f1bc5

Browse files
authored
Deprecate an unused public render node transformer. (#1019)
1 parent feb6dc1 commit e4f1bc5

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Sources/SwiftDocC/Converter/Rewriter/RemoveAutomaticallyCuratedSeeAlsoSectionsTransformation.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
/*
22
This source file is part of the Swift.org open source project
33

4-
Copyright (c) 2021 Apple Inc. and the Swift project authors
4+
Copyright (c) 2021-2024 Apple Inc. and the Swift project authors
55
Licensed under Apache License v2.0 with Runtime Library Exception
66

77
See https://swift.org/LICENSE.txt for license information
88
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
*/
1010

1111
/// A transformation that removes automatically curated See Also sections.
12+
@available(*, deprecated, message: "This deprecated API will be removed after 6.1 is released")
1213
public struct RemoveAutomaticallyCuratedSeeAlsoSectionsTransformation: RenderNodeTransforming {
1314
/// Creates a new transformer.
1415
public init() {}

Sources/SwiftDocC/SwiftDocC.docc/SwiftDocC/PersistingDocumentation.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ The precise path inside the output folder where resulting JSON file is saved is
3434
### Render Node Rewriter
3535

3636
- ``RenderNodeTransforming``
37-
- ``RemoveAutomaticallyCuratedSeeAlsoSectionsTransformation``
3837
- ``RemoveUnusedReferencesTransformation``
3938
- ``RenderNodeTransformationComposition``
4039
- ``RenderNodeTransformationContext``

Tests/SwiftDocCTests/Converter/RenderNodeTransformerTests.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
This source file is part of the Swift.org open source project
33

4-
Copyright (c) 2021 Apple Inc. and the Swift project authors
4+
Copyright (c) 2021-2024 Apple Inc. and the Swift project authors
55
Licensed under Apache License v2.0 with Runtime Library Exception
66

77
See https://swift.org/LICENSE.txt for license information
@@ -12,6 +12,9 @@ import XCTest
1212
@testable import SwiftDocC
1313

1414
class RenderNodeTransformerTests: XCTestCase {
15+
// This test uses ``RemoveAutomaticallyCuratedSeeAlsoSectionsTransformation`` which is deprecated.
16+
// Deprecating the test silences the deprecation warning when running the tests. It doesn't skip the test.
17+
@available(*, deprecated)
1518
func testRemovesAutomaticallyCuratedSeeAlsoSections() throws {
1619
let symbolJSON = try String(contentsOf: Bundle.module.url(
1720
forResource: "symbol-with-automatic-see-also-section", withExtension: "json",
@@ -28,6 +31,9 @@ class RenderNodeTransformerTests: XCTestCase {
2831
XCTAssertEqual(renderNode.references.count, 11)
2932
}
3033

34+
// This test uses ``RemoveAutomaticallyCuratedSeeAlsoSectionsTransformation`` which is deprecated.
35+
// Deprecating the test silences the deprecation warning when running the tests. It doesn't skip the test.
36+
@available(*, deprecated)
3137
func testRemovesAutomaticallyCuratedSeeAlsoSectionsPreservingReferences() throws {
3238
let symbolJSON = try String(contentsOf: Bundle.module.url(
3339
forResource: "symbol-auto-see-also-fragments-and-relationships", withExtension: "json",

0 commit comments

Comments
 (0)