diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml deleted file mode 100644 index cdb528c2..00000000 --- a/.github/workflows/documentation.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Documentation - -on: - release: - types: - - published - push: - branches: - - main - workflow_dispatch: - -concurrency: - group: docs-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: macos-12 - steps: - - name: Select Xcode 14.1 - run: sudo xcode-select -s /Applications/Xcode_14.1.app - - - name: Checkout Package - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Checkout gh-pages Branch - uses: actions/checkout@v3 - with: - ref: gh-pages - path: docs-out - - - name: Build documentation - run: > - rm -rf docs-out/.git; - rm -rf docs-out/main; - git tag -l --sort=-v:refname | grep -e "\d\+\.\d\+.0" | tail -n +6 | xargs -I {} rm -rf {}; - - for tag in $(echo "main"; git tag -l --sort=-v:refname | grep -e "\d\+\.\d\+.0" | head -6); - do - if [ -d "docs-out/$tag/data/documentation/dependencies" ] - then - echo "✅ Documentation for "$tag" already exists."; - else - echo "⏳ Generating documentation for Dependencies @ "$tag" release."; - rm -rf "docs-out/$tag"; - - git checkout .; - git checkout "$tag"; - - swift package \ - --allow-writing-to-directory docs-out/"$tag" \ - generate-documentation \ - --target Dependencies \ - --output-path docs-out/"$tag" \ - --transform-for-static-hosting \ - --hosting-base-path /swift-dependencies/"$tag" \ - && echo "✅ Documentation generated for Dependencies @ "$tag" release." \ - || echo "⚠️ Documentation skipped for Dependencies @ "$tag"."; - fi; - done - - - name: Fix permissions - run: 'sudo chown -R $USER docs-out' - - - name: Publish documentation to GitHub Pages - uses: JamesIves/github-pages-deploy-action@4.1.7 - with: - branch: gh-pages - folder: docs-out - single-commit: true diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index fa9bde85..8cfaed81 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -12,15 +12,13 @@ concurrency: jobs: swift_format: name: swift-format - runs-on: macos-12 + runs-on: macos-13 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Xcode Select - run: sudo xcode-select -s /Applications/Xcode_14.0.1.app - - name: Tap - run: brew tap pointfreeco/formulae + run: sudo xcode-select -s /Applications/Xcode_15.0.1.app - name: Install - run: brew install Formulae/swift-format@5.7 + run: brew install swift-format - name: Format run: make format - uses: stefanzweifel/git-auto-commit-action@v4 diff --git a/Makefile b/Makefile index 30679132..c5fb439e 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ format: --ignore-unparsable-files \ --in-place \ --recursive \ - ./Package.swift ./Sources ./Tests + ./Package.swift ./Sources ./Tests/DependenciesTests .PHONY: test test-swift test-linux build-for-library-evolution format diff --git a/Sources/DependenciesMacros/Macros.swift b/Sources/DependenciesMacros/Macros.swift index 9dbfc2fa..7b8f0ddf 100644 --- a/Sources/DependenciesMacros/Macros.swift +++ b/Sources/DependenciesMacros/Macros.swift @@ -82,9 +82,10 @@ /// [separating-interface-implementation]: https://pointfreeco.github.io/swift-dependencies/main/documentation/dependencies/livepreviewtest#Separating-interface-and-implementation @attached(member, names: named(init)) @attached(memberAttribute) -public macro DependencyClient() = #externalMacro( - module: "DependenciesMacrosPlugin", type: "DependencyClientMacro" -) +public macro DependencyClient() = + #externalMacro( + module: "DependenciesMacrosPlugin", type: "DependencyClientMacro" + ) /// Provides a default, "unimplemented" value to a closure property. /// @@ -150,9 +151,10 @@ public macro DependencyClient() = #externalMacro( /// ``` @attached(accessor, names: named(init), named(get), named(set)) @attached(peer, names: arbitrary) -public macro DependencyEndpoint(method: String = "") = #externalMacro( - module: "DependenciesMacrosPlugin", type: "DependencyEndpointMacro" -) +public macro DependencyEndpoint(method: String = "") = + #externalMacro( + module: "DependenciesMacrosPlugin", type: "DependencyEndpointMacro" + ) /// The error thrown by "unimplemented" closures produced by ``DependencyEndpoint(method:)`` public struct Unimplemented: Error { diff --git a/Tests/DependenciesMacrosPluginTests/DependencyClientMacroTests.swift b/Tests/DependenciesMacrosPluginTests/DependencyClientMacroTests.swift index 934650e4..ef8602b8 100644 --- a/Tests/DependenciesMacrosPluginTests/DependencyClientMacroTests.swift +++ b/Tests/DependenciesMacrosPluginTests/DependencyClientMacroTests.swift @@ -476,7 +476,6 @@ final class DependencyClientMacroTests: BaseTestCase { } } - func testAvailability_WithDependencyEndpoint() { assertMacro([DependencyClientMacro.self, DependencyEndpointMacro.self]) { """ diff --git a/Tests/DependenciesMacrosPluginTests/DependencyEndpointMacroTests.swift b/Tests/DependenciesMacrosPluginTests/DependencyEndpointMacroTests.swift index 99e6abb3..7934ff7f 100644 --- a/Tests/DependenciesMacrosPluginTests/DependencyEndpointMacroTests.swift +++ b/Tests/DependenciesMacrosPluginTests/DependencyEndpointMacroTests.swift @@ -484,7 +484,6 @@ final class DependencyEndpointMacroTests: BaseTestCase { } } - func testMethodName() { assertMacro { """