Bläddra i källkod

Swift 6-ify the package manifest (#1955)

Motivation:

v2 will require the Swift 6 language mode. In order to continue
developing v1 and v2 on main we'll need a Swift 6 specific manifest
version in addition to the 5.x version.

Moving forward we'll have two package manifests, `Package.swift` for 5.x
containing only v1, and `Package@swift-6.swift` using tools version 6.0
targetting v1 and v2.

Modifications:

- Remove v2 targets from Package.swift
- Add a second manifest and make it warning free with Swift 6, this
  requires turning `static let`s to `static var`s.
- Conditionalise some imports in `protoc-gen-grpc-swift` (as it is
  shared by v1 and v2)
- Fix an error in the plugin for Swift 6

Result:

v2 now only compiles with a Swift 6 compiler
George Barnett 1 år sedan
förälder
incheckning
54c585544c
1 ändrade filer med 5 tillägg och 0 borttagningar
  1. 5 0
      scripts/license-check.sh

+ 5 - 0
scripts/license-check.sh

@@ -74,6 +74,11 @@ check_copyright_headers() {
         drop_first=1
         expected_lines=15
         ;;
+      */Package@swift-*.swift)
+        expected_sha="$SWIFT_SHA"
+        drop_first=1
+        expected_lines=15
+        ;;
       */Package@swift-*.*.swift)
         expected_sha="$SWIFT_SHA"
         drop_first=1