Skip to content

Commit 7e188fc

Browse files
authored
Merge branch 'main' into follow-up
2 parents 3342056 + 4587c27 commit 7e188fc

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Sources/GRPCProtobufCodeGen/ProtobufCodeGenParser.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ extension ProtobufCodeGenParser {
9696
file: FileDescriptor
9797
) -> [Dependency] {
9898
var codeDependencies: [Dependency] = [
99-
.init(module: "GRPCProtobuf", accessLevel: .internal)
99+
Dependency(module: "GRPCProtobuf", accessLevel: .internal),
100+
Dependency(module: "SwiftProtobuf", accessLevel: self.accessLevel),
100101
]
101102
// Adding as dependencies the modules containing generated code or types for
102103
// '.proto' files imported in the '.proto' file we are parsing.

Tests/GRPCProtobufCodeGenTests/ProtobufCodeGenParserTests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ struct ProtobufCodeGenParserTests {
6161
@Test("Dependencies")
6262
func dependencies() {
6363
let expected: [GRPCCodeGen.Dependency] = [
64-
.init(module: "GRPCProtobuf", accessLevel: .internal) // Always an internal import
64+
.init(module: "GRPCProtobuf", accessLevel: .internal), // Always an internal import
65+
.init(module: "SwiftProtobuf", accessLevel: .internal),
6566
]
6667
#expect(self.codeGen.dependencies == expected)
6768
}
@@ -173,7 +174,8 @@ struct ProtobufCodeGenParserTests {
173174
@Test("Dependencies")
174175
func dependencies() {
175176
let expected: [GRPCCodeGen.Dependency] = [
176-
.init(module: "GRPCProtobuf", accessLevel: .internal) // Always an internal import
177+
.init(module: "GRPCProtobuf", accessLevel: .internal), // Always an internal import
178+
.init(module: "SwiftProtobuf", accessLevel: .internal),
177179
]
178180
#expect(self.codeGen.dependencies == expected)
179181
}

Tests/GRPCProtobufCodeGenTests/ProtobufCodeGeneratorTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ struct ProtobufCodeGeneratorTests: UsesDescriptorSet {
6767
6868
import GRPCCore
6969
import GRPCProtobuf
70+
import SwiftProtobuf
7071
7172
// MARK: - test.TestService
7273

0 commit comments

Comments
 (0)