diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 576d485..a0d663a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -95,9 +95,12 @@ jobs: runs-on: macOS-14 env: DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer - SWIFT_SYNTAX_REVISION: ${{ matrix.revision }} steps: - name: Checkout Repo uses: actions/checkout@v4 + - name: Update Package Pins + run: | + jq '(.pins[] | select(.identity == "swift-syntax") | .state.revision) = "${{ matrix.revision }}" | (.pins[] | select(.identity == "swift-syntax") | .state.version) = "${{ matrix.swift-syntax }}"' Package.resolved | sed 's/": /" : /g' > Package.resolved.tmp && mv Package.resolved.tmp Package.resolved + git diff Package.resolved - name: Run Tests run: xcodebuild clean test -scheme XCStringsTool-Package -destination platform=macOS diff --git a/Package.swift b/Package.swift index b882f8d..1c55cb5 100644 --- a/Package.swift +++ b/Package.swift @@ -170,12 +170,3 @@ if ProcessInfo.processInfo.environment.keys.contains("BENCHMARK_PACKAGE") { ) ) } - -// Support testing different versions of Swift Syntax -if let revision = ProcessInfo.processInfo.environment["SWIFT_SYNTAX_REVISION"] { - // TODO: The `kind` symbol isn't available in Xcode 15.2? Check newer versions. - package.dependencies.removeAll(where: { $0.url == "https://github.com/swiftlang/swift-syntax" }) - package.dependencies.append( - .package(url: "https://github.com/swiftlang/swift-syntax", revision: revision) - ) -}