Skip to content

Commit

Permalink
Remove v2 code from v1 (#2110)
Browse files Browse the repository at this point in the history
Motivation:

There's a bug in SwiftPM which prohibits the Xcode build system from
being used if a dependency explicitly declares which Swift language mode
is being used, regardless of its value. A number of users are running
into this problem, and while it's not a gRPC Swift bug we can work
around the issue by removing the v2 code from the v1 branch and removing
the Swift 6 specific manifest.

Modifications:

- Remove all v2 code
- Remove workarounds in the SwiftPM build plugin which avoid deprecation
warnings. It turns out that the guard was incorrect anyway: the API
isn't guarded by the compiler version, but the package tools version.

Result:

Possible to build v1 with SwiftPM using the Xcode build system.
  • Loading branch information
glbrntt authored Nov 8, 2024
1 parent b5023df commit 0329ecc
Show file tree
Hide file tree
Showing 411 changed files with 11 additions and 85,033 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,32 +108,19 @@ jobs:
run: ./Performance/allocations/test-allocation-counts.sh
env: ${{ matrix.env }}
timeout-minutes: 20
- name: Install jemalloc for benchmarking
if: ${{ matrix.swift-version == '6.0' || matrix.swift-version == 'main' }}
run: apt update && apt-get install -y libjemalloc-dev
timeout-minutes: 20
- name: Run Benchmarks
if: ${{ matrix.swift-version == '6.0' || matrix.swift-version == 'main' }}
working-directory: ./Performance/Benchmarks
run: swift package benchmark baseline check --no-progress --check-absolute-path Thresholds/${{ matrix.swift-version }}/
timeout-minutes: 20
integration-tests:
strategy:
fail-fast: false
matrix:
include:
- image: swiftlang/swift:nightly-jammy
swift-tools-version: '6.0'
supports-v2: true
- image: swift:6.0-jammy
swift-tools-version: '6.0'
supports-v2: true
- image: swift:5.10.1-noble
swift-tools-version: '5.10'
supports-v2: false
- image: swift:5.9-jammy
swift-tools-version: '5.9'
supports-v2: false
name: Integration Tests on ${{ matrix.image }}
runs-on: ubuntu-latest
container:
Expand All @@ -144,9 +131,6 @@ jobs:
run: apt update && apt install -y protobuf-compiler
- name: SwiftPM plugin test (v1)
run: ./scripts/run-plugin-tests.sh ${{ matrix.swift-tools-version }} "v1"
- name: SwiftPM plugin test (v2)
if: ${{ matrix.supports-v2 }}
run: ./scripts/run-plugin-tests.sh ${{ matrix.swift-tools-version }} "v2"
- name: Build without NIOSSL
run: swift build
env:
Expand Down
27 changes: 0 additions & 27 deletions Examples/v2/echo/Echo.swift

This file was deleted.

Loading

0 comments on commit 0329ecc

Please sign in to comment.