From dbace16f126fdcd80d58dc54526c561ca17327d7 Mon Sep 17 00:00:00 2001 From: George Barnett Date: Thu, 3 Oct 2024 18:09:39 +0100 Subject: [PATCH] We no longer require the docc plugin (#208) Motivation: Swift Package Index builds our docs for us and will automatically insert the dependency. Modifications: - Remove the docc-plugin dependency Result: Fewer dependencies --- Package.swift | 1 - scripts/check-docs.sh | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 3f48e55..c2d0a0e 100644 --- a/Package.swift +++ b/Package.swift @@ -23,7 +23,6 @@ let package = Package( dependencies: [ .package(url: "https://github.com/apple/swift-nio.git", from: "2.62.0"), .package(url: "https://github.com/apple/swift-atomics.git", from: "1.0.2"), - .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"), ], targets: [ .target( diff --git a/scripts/check-docs.sh b/scripts/check-docs.sh index 9405b7e..01370cf 100755 --- a/scripts/check-docs.sh +++ b/scripts/check-docs.sh @@ -18,6 +18,9 @@ set -eu raw_targets=$(sed -E -n -e 's/^.* - documentation_targets: \[(.*)\].*$/\1/p' .spi.yml) targets=(${raw_targets//,/ }) +# Add the DocC plugin; the doc checking CI runs on 5.8 so we can't use "swift package add-dependency". +echo 'package.dependencies.append(.package(url: "https://github.com/apple/swift-docc-plugin.git", from: "1.0.0"))' >> Package.swift + for target in "${targets[@]}"; do swift package plugin generate-documentation --target "$target" --warnings-as-errors --analyze --level detailed done