Skip to content
Open
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
52 changes: 35 additions & 17 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 16 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,17 @@ let package = Package(
.library(name: "TerminalProgress", targets: ["TerminalProgress"]),
],
dependencies: [
.package(url: "https://github.com/Bouke/DNS.git", from: "1.2.0"),
.package(url: "https://github.com/apple/containerization.git", exact: Version(stringLiteral: scVersion)),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.3.0"),
.package(url: "https://github.com/apple/swift-collections.git", from: "1.2.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.80.0"),
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.29.0"),
.package(url: "https://github.com/apple/swift-system.git", from: "1.4.0"),
.package(url: "https://github.com/grpc/grpc-swift.git", from: "1.26.0"),
.package(url: "https://github.com/orlandos-nl/DNSClient.git", from: "2.4.1"),
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.36.0"),
.package(url: "https://github.com/apple/swift-system.git", from: "1.6.4"),
.package(url: "https://github.com/Bouke/DNS.git", from: "1.2.0"),
.package(url: "https://github.com/grpc/grpc-swift-2.git", from: "2.3.0"),
.package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "2.4.4"),
.package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "2.2.0"),
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.20.1"),
.package(url: "https://github.com/swiftlang/swift-docc-plugin.git", from: "1.1.0"),
],
Expand Down Expand Up @@ -111,10 +112,14 @@ let package = Package(
dependencies: [
.product(name: "Logging", package: "swift-log"),
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "Containerization", package: "containerization"),
.product(name: "ContainerizationArchive", package: "containerization"),
.product(name: "ContainerizationOCI", package: "containerization"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "GRPCCore", package: "grpc-swift-2"),
.product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"),
.product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"),
"ContainerAPIClient",
]
),
Expand All @@ -133,7 +138,9 @@ let package = Package(
.product(name: "ContainerizationExtras", package: "containerization"),
.product(name: "ContainerizationOS", package: "containerization"),
.product(name: "ContainerizationEXT4", package: "containerization"),
.product(name: "GRPC", package: "grpc-swift"),
.product(name: "GRPCCore", package: "grpc-swift-2"),
.product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"),
.product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"),
.product(name: "Logging", package: "swift-log"),
"ContainerAPIService",
"ContainerAPIClient",
Expand Down Expand Up @@ -300,7 +307,9 @@ let package = Package(
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "Logging", package: "swift-log"),
.product(name: "GRPC", package: "grpc-swift"),
.product(name: "GRPCCore", package: "grpc-swift-2"),
.product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"),
.product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"),
.product(name: "Containerization", package: "containerization"),
"ContainerLog",
"ContainerPlugin",
Expand Down Expand Up @@ -427,7 +436,6 @@ let package = Package(
dependencies: [
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "DNSClient", package: "DNSClient"),
.product(name: "DNS", package: "DNS"),
.product(name: "Logging", package: "swift-log"),
.product(name: "ContainerizationOS", package: "containerization"),
Expand Down
4 changes: 2 additions & 2 deletions Protobuf.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $(PROTOC):
.PHONY: protoc-gen-swift
protoc-gen-swift:
@$(SWIFT) build --product protoc-gen-swift
@$(SWIFT) build --product protoc-gen-grpc-swift
@$(SWIFT) build --product protoc-gen-grpc-swift-2

.PHONY: protos
protos: $(PROTOC) protoc-gen-swift
Expand All @@ -47,7 +47,7 @@ protos: $(PROTOC) protoc-gen-swift
cd $(LOCAL_DIR) && git clone --branch $(BUILDER_SHIM_VERSION) --depth 1 $(BUILDER_SHIM_REPO); \
fi
@$(PROTOC) $(LOCAL_DIR)/container-builder-shim/pkg/api/Builder.proto \
--plugin=protoc-gen-grpc-swift=$(BUILD_BIN_DIR)/protoc-gen-grpc-swift \
--plugin=protoc-gen-grpc-swift=$(BUILD_BIN_DIR)/protoc-gen-grpc-swift-2 \
--plugin=protoc-gen-swift=$(BUILD_BIN_DIR)/protoc-gen-swift \
--proto_path=$(LOCAL_DIR)/container-builder-shim/pkg/api \
--grpc-swift_out="Sources/ContainerBuild" \
Expand Down
4 changes: 0 additions & 4 deletions Sources/ContainerBuild/BuildAPI+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ public typealias ClientStream = Com_Apple_Container_Build_V1_ClientStream
public typealias ServerStream = Com_Apple_Container_Build_V1_ServerStream
public typealias ImageTransfer = Com_Apple_Container_Build_V1_ImageTransfer
public typealias BuildTransfer = Com_Apple_Container_Build_V1_BuildTransfer
public typealias BuilderClient = Com_Apple_Container_Build_V1_BuilderNIOClient
public typealias BuilderClientAsync = Com_Apple_Container_Build_V1_BuilderAsyncClient
public typealias BuilderClientProtocol = Com_Apple_Container_Build_V1_BuilderClientProtocol
public typealias BuilderClientAsyncProtocol = Com_Apple_Container_Build_V1_BuilderAsyncClient

extension BuildTransfer {
func stage() -> String? {
Expand Down
2 changes: 1 addition & 1 deletion Sources/ContainerBuild/BuildFSSync.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import ContainerizationArchive
import ContainerizationOCI
import CryptoKit
import Foundation
import GRPC
import GRPCCore

actor BuildFSSync: BuildPipelineHandler {
let contextDir: URL
Expand Down
2 changes: 1 addition & 1 deletion Sources/ContainerBuild/BuildImageResolver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import ContainerAPIClient
import Containerization
import ContainerizationOCI
import Foundation
import GRPC
import GRPCCore
import Logging
import TerminalProgress

Expand Down
8 changes: 4 additions & 4 deletions Sources/ContainerBuild/BuildPipelineHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//===----------------------------------------------------------------------===//

import Foundation
import GRPC
import GRPCCore
import NIO

protocol BuildPipelineHandler: Sendable {
Expand All @@ -35,10 +35,10 @@ public actor BuildPipeline {
]
}

public func run(
public func run<S: AsyncSequence & Sendable>(
sender: AsyncStream<ClientStream>.Continuation,
receiver: GRPCAsyncResponseStream<ServerStream>
) async throws {
receiver: S
) async throws where S.Element == ServerStream {
defer { sender.finish() }
try await untilFirstError { group in
for try await packet in receiver {
Expand Down
2 changes: 1 addition & 1 deletion Sources/ContainerBuild/BuildRemoteContentProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import Containerization
import ContainerizationArchive
import ContainerizationOCI
import Foundation
import GRPC
import GRPCCore

struct BuildRemoteContentProxy: BuildPipelineHandler {
let local: ContentStore
Expand Down
2 changes: 1 addition & 1 deletion Sources/ContainerBuild/BuildStdio.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import ContainerizationOS
import Foundation
import GRPC
import GRPCCore
import NIO

actor BuildStdio: BuildPipelineHandler {
Expand Down
Loading
Loading