diff --git a/Sources/GRPCProtobufCodeGen/ProtobufCodeGenParser.swift b/Sources/GRPCProtobufCodeGen/ProtobufCodeGenParser.swift index e0a0667..a502b96 100644 --- a/Sources/GRPCProtobufCodeGen/ProtobufCodeGenParser.swift +++ b/Sources/GRPCProtobufCodeGen/ProtobufCodeGenParser.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -internal import Foundation internal import SwiftProtobuf package import SwiftProtobufPluginLibrary @@ -25,6 +24,12 @@ package import struct GRPCCodeGen.Name package import struct GRPCCodeGen.ServiceDescriptor package import struct GRPCCodeGen.SourceGenerator +#if canImport(FoundationEssentials) +internal import struct FoundationEssentials.IndexPath +#else +internal import struct Foundation.IndexPath +#endif + /// Parses a ``FileDescriptor`` object into a ``CodeGenerationRequest`` object. package struct ProtobufCodeGenParser { let extraModuleImports: [String] diff --git a/Sources/protoc-gen-grpc-swift/GenerateGRPC.swift b/Sources/protoc-gen-grpc-swift/GenerateGRPC.swift index f878d7e..4616486 100644 --- a/Sources/protoc-gen-grpc-swift/GenerateGRPC.swift +++ b/Sources/protoc-gen-grpc-swift/GenerateGRPC.swift @@ -14,7 +14,6 @@ * limitations under the License. */ -import Foundation import GRPCCodeGen import GRPCProtobufCodeGen import SwiftProtobuf diff --git a/Sources/protoc-gen-grpc-swift/Options.swift b/Sources/protoc-gen-grpc-swift/Options.swift index 05bf131..b198f3c 100644 --- a/Sources/protoc-gen-grpc-swift/Options.swift +++ b/Sources/protoc-gen-grpc-swift/Options.swift @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import Foundation + import SwiftProtobufPluginLibrary enum GenerationError: Error {