From 473a6a81dc6c8f156049657555ed76124b761fa1 Mon Sep 17 00:00:00 2001 From: Doug Gregor Date: Mon, 10 Mar 2025 15:58:08 -0700 Subject: [PATCH 1/4] Generalize categoryFootnotes to work on any sequence --- Sources/SwiftDiagnostics/DiagnosticsFormatter.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SwiftDiagnostics/DiagnosticsFormatter.swift b/Sources/SwiftDiagnostics/DiagnosticsFormatter.swift index 327b678c082..28f4d18bf4e 100644 --- a/Sources/SwiftDiagnostics/DiagnosticsFormatter.swift +++ b/Sources/SwiftDiagnostics/DiagnosticsFormatter.swift @@ -367,7 +367,7 @@ public struct DiagnosticsFormatter { /// - leadingText: text that is prefixed to the list of categories when /// there is at least one category to print. public func categoryFootnotes( - _ categories: [DiagnosticCategory], + _ categories: some Sequence, leadingText: String = "\n" ) -> String { let categoriesInOrder = categories.compactMap { category in From b9db1eac54cdff686b321c9e192554d0a03f89ef Mon Sep 17 00:00:00 2001 From: Doug Gregor Date: Mon, 10 Mar 2025 16:23:37 -0700 Subject: [PATCH 2/4] Document API change to 24-hour-old API --- api-breakages.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/api-breakages.txt b/api-breakages.txt index 4f5611e7187..d51ff3294f3 100644 --- a/api-breakages.txt +++ b/api-breakages.txt @@ -1,2 +1,3 @@ 6.2 --- +func DiagnosticsFormatter.categoryFootnotes(_:leadingText:) has parameter 0 type change from [SwiftDiagnostics.DiagnosticCategory] to some Swift.Sequence From 6877115bc7f4f9041d76d1e590baec1b9c1ee81b Mon Sep 17 00:00:00 2001 From: Doug Gregor Date: Mon, 10 Mar 2025 16:46:40 -0700 Subject: [PATCH 3/4] Fix up the magic stream needed to silence API breakage checking --- api-breakages.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-breakages.txt b/api-breakages.txt index d51ff3294f3..123bcdbdc42 100644 --- a/api-breakages.txt +++ b/api-breakages.txt @@ -1,3 +1,3 @@ 6.2 --- -func DiagnosticsFormatter.categoryFootnotes(_:leadingText:) has parameter 0 type change from [SwiftDiagnostics.DiagnosticCategory] to some Swift.Sequence +API breakage: func DiagnosticsFormatter.categoryFootnotes(_:leadingText:) has parameter 0 type change from [SwiftDiagnostics.DiagnosticCategory] to some Swift.Sequence From 50ca735b34d7848345e27dff265da9512b1c0359 Mon Sep 17 00:00:00 2001 From: Doug Gregor Date: Mon, 10 Mar 2025 16:51:26 -0700 Subject: [PATCH 4/4] Fix API breakage checker configuration --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index a773e0117c2..36f8fda7a67 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -12,7 +12,7 @@ jobs: name: Soundness uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main with: - api_breakage_check_allowlist_path: "Release Notes/api-breakages.txt" + api_breakage_check_allowlist_path: "api-breakages.txt" docs_check_additional_arguments: "--disable-parameters-and-returns-validation" verify_source_code: name: Validate generated code