Skip to content

Commit 7132978

Browse files
committed
fix: only generate requested files
1 parent 30840f2 commit 7132978

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/plugin/generate.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ func Generate(request *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorRe
3939
packageDirs := make(map[protoreflect.FullName]string)
4040
seenPackages := make(map[protoreflect.FullName]struct{})
4141
protoFiles.RangeFiles(func(file protoreflect.FileDescriptor) bool {
42+
if _, ok := generate[file.Path()]; !ok {
43+
return true
44+
}
4245
pkg := file.Package()
4346
if _, ok := seenPackages[pkg]; ok {
4447
return true

0 commit comments

Comments
 (0)