Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 56 additions & 12 deletions Package@swift-6.swift
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,11 @@ extension Target {
.atomics
],
path: "Sources/GRPCCore",
swiftSettings: [._swiftLanguageMode(.v5), .enableUpcomingFeature("ExistentialAny")]
swiftSettings: [
._swiftLanguageMode(.v5),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
]
)
}

Expand All @@ -217,7 +221,11 @@ extension Target {
dependencies: [
.grpcCore
],
swiftSettings: [._swiftLanguageMode(.v6), .enableUpcomingFeature("ExistentialAny")]
swiftSettings: [
._swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
]
)
}

Expand All @@ -228,7 +236,11 @@ extension Target {
.grpcCore,
.tracing
],
swiftSettings: [._swiftLanguageMode(.v6), .enableUpcomingFeature("ExistentialAny")]
swiftSettings: [
._swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
]
)
}

Expand All @@ -243,7 +255,11 @@ extension Target {
.dequeModule,
.atomics
],
swiftSettings: [._swiftLanguageMode(.v6), .enableUpcomingFeature("ExistentialAny")]
swiftSettings: [
._swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
]
)
}

Expand All @@ -256,7 +272,11 @@ extension Target {
.nioPosix,
.nioExtras
],
swiftSettings: [._swiftLanguageMode(.v6), .enableUpcomingFeature("ExistentialAny")]
swiftSettings: [
._swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
]
)
}

Expand All @@ -270,7 +290,11 @@ extension Target {
.nioExtras,
.nioTransportServices
],
swiftSettings: [._swiftLanguageMode(.v6), .enableUpcomingFeature("ExistentialAny")]
swiftSettings: [
._swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
]
)
}

Expand All @@ -283,7 +307,11 @@ extension Target {
.grpcHTTP2TransportNIOPosix,
.grpcHTTP2TransportNIOTransportServices,
],
swiftSettings: [._swiftLanguageMode(.v6), .enableUpcomingFeature("ExistentialAny")]
swiftSettings: [
._swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
]
)
}

Expand Down Expand Up @@ -510,7 +538,7 @@ extension Target {
.grpcCore,
.grpcProtobuf
],
swiftSettings: [._swiftLanguageMode(.v5), .enableUpcomingFeature("ExistentialAny")]
swiftSettings: [._swiftLanguageMode(.v6), .enableUpcomingFeature("ExistentialAny")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one doesn't have "InternalImportsByDefault"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's because there are a bunch of generated files in this module. I will enable it for this one in a follow up PR after I've changed the code generator.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks for clarifying!

)
}

Expand Down Expand Up @@ -814,7 +842,11 @@ extension Target {
.target(
name: "GRPCCodeGen",
path: "Sources/GRPCCodeGen",
swiftSettings: [._swiftLanguageMode(.v6), .enableUpcomingFeature("ExistentialAny")]
swiftSettings: [
._swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
]
)
}

Expand All @@ -826,7 +858,11 @@ extension Target {
.protobuf,
],
path: "Sources/GRPCProtobuf",
swiftSettings: [._swiftLanguageMode(.v6), .enableUpcomingFeature("ExistentialAny")]
swiftSettings: [
._swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
]
)
}

Expand All @@ -839,7 +875,11 @@ extension Target {
.grpcCodeGen
],
path: "Sources/GRPCProtobufCodeGen",
swiftSettings: [._swiftLanguageMode(.v6), .enableUpcomingFeature("ExistentialAny")]
swiftSettings: [
._swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
]
)
}

Expand All @@ -851,7 +891,11 @@ extension Target {
.grpcProtobuf
],
path: "Sources/Services/Health",
swiftSettings: [._swiftLanguageMode(.v6)]
swiftSettings: [
._swiftLanguageMode(.v6),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault")
]
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/
#if canImport(Darwin)
import Darwin
public import Darwin // should be @usableFromInline
#else
import Glibc
public import Glibc // should be @usableFromInline
#endif

@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/GRPCClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import Atomics
internal import Atomics

/// A gRPC client.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/GRPCServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import Atomics
internal import Atomics

/// A gRPC server.
///
Expand Down
4 changes: 2 additions & 2 deletions Sources/GRPCCore/Internal/Concurrency Primitives/Lock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
//===----------------------------------------------------------------------===//

#if canImport(Darwin)
import Darwin
public import Darwin // should be @usableFromInline
#elseif canImport(Glibc)
import Glibc
public import Glibc // should be @usableFromInline
#endif

@usableFromInline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Atomics

public import Atomics // should be @usableFromInline

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
@usableFromInline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import DequeModule

public import DequeModule // should be @usableFromInline

/// An `AsyncSequence` which can broadcast its values to multiple consumers concurrently.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCCore/Streaming/Internal/BufferedStream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
//
//===----------------------------------------------------------------------===//

import DequeModule
public import DequeModule // should be @usableFromInline

/// An asynchronous sequence generated from an error-throwing closure that
/// calls a continuation to produce new elements.
Expand Down
3 changes: 2 additions & 1 deletion Sources/GRPCCore/Timeout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Dispatch

internal import Dispatch

/// A timeout for a gRPC call.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import NIOCore
import NIOHTTP2
package import NIOCore
package import NIOHTTP2

/// An event which happens on a client's HTTP/2 connection.
package enum ClientConnectionEvent: Sendable {
Expand Down
8 changes: 4 additions & 4 deletions Sources/GRPCHTTP2Core/Client/Connection/Connection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*/

import GRPCCore
import NIOConcurrencyHelpers
import NIOCore
import NIOHTTP2
package import GRPCCore
internal import NIOConcurrencyHelpers
package import NIOCore
package import NIOHTTP2

/// A `Connection` provides communication to a single remote peer.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

import NIOCore
import NIOHTTP2
import NIOPosix
package import NIOCore
package import NIOHTTP2
internal import NIOPosix

@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
package protocol HTTP2Connector: Sendable {
Expand Down
6 changes: 3 additions & 3 deletions Sources/GRPCHTTP2Core/Client/Connection/GRPCChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

import Atomics
import DequeModule
import GRPCCore
internal import Atomics
internal import DequeModule
package import GRPCCore

@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
package struct GRPCChannel: ClientTransport {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import GRPCCore
package import GRPCCore

/// A load-balancer which has a single subchannel.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import GRPCCore
package import GRPCCore

/// A load-balancer which maintains to a set of subchannels and uses round-robin to pick a
/// subchannel when picking a subchannel to use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import GRPCCore
import NIOConcurrencyHelpers
package import GRPCCore
internal import NIOConcurrencyHelpers

/// A ``Subchannel`` provides communication to a single ``Endpoint``.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCHTTP2Core/Client/Connection/RequestQueue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import DequeModule
internal import DequeModule

@available(macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0, *)
struct RequestQueue {
Expand Down
6 changes: 3 additions & 3 deletions Sources/GRPCHTTP2Core/Client/GRPCClientStreamHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

import GRPCCore
import NIOCore
import NIOHTTP2
internal import GRPCCore
internal import NIOCore
internal import NIOHTTP2

@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
final class GRPCClientStreamHandler: ChannelDuplexHandler {
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCHTTP2Core/Client/HTTP2ClientTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import GRPCCore
public import GRPCCore

/// A namespace for the HTTP/2 client transport.
public enum HTTP2ClientTransport {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import GRPCCore
internal import GRPCCore

extension ResolvableTargets {
/// A resolvable target for IPv4 addresses.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import GRPCCore
internal import GRPCCore

extension ResolvableTargets {
/// A resolvable target for IPv4 addresses.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import GRPCCore
internal import GRPCCore

extension ResolvableTargets {
/// A resolvable target for Unix Domain Socket address.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import GRPCCore
internal import GRPCCore

extension ResolvableTargets {
/// A resolvable target for Virtual Socket addresses.
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPCHTTP2Core/Client/Resolver/NameResolver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import GRPCCore
public import GRPCCore

/// A name resolver can provide resolved addresses and service configuration values over time.
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import GRPCCore
internal import GRPCCore

extension CompressionAlgorithm {
init?(name: String) {
Expand Down
Loading