From aca44b779a3fddb3b115e12f83a7a3b8327f856f Mon Sep 17 00:00:00 2001 From: Edward McFarlane <3036610+emcfarlane@users.noreply.github.com> Date: Tue, 14 Jan 2025 10:31:10 -0500 Subject: [PATCH] Use the resolver from the image Co-authored-by: Joshua Humphries <2035234+jhump@users.noreply.github.com> --- private/bufpkg/bufcheck/util.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/private/bufpkg/bufcheck/util.go b/private/bufpkg/bufcheck/util.go index e2212f9e62..a5d6dcdb9b 100644 --- a/private/bufpkg/bufcheck/util.go +++ b/private/bufpkg/bufcheck/util.go @@ -57,9 +57,7 @@ func imageToProtoFileDescriptors(image bufimage.Image) ([]*descriptorv1.FileDesc } resolver := protoencoding.CombineResolvers( goFeaturesResolver, - protoencoding.NewLazyResolver(slicesext.Map(descriptors, func(fileDescriptor *descriptorv1.FileDescriptor) *descriptorpb.FileDescriptorProto { - return fileDescriptor.FileDescriptorProto - })...), + image.Resolver(), ) for _, descriptor := range reparseDescriptors { // We clone the FileDescriptorProto to avoid modifying the original.