Skip to content

Commit ee32c27

Browse files
authored
Fix generation is run for imported files (#409)
1 parent 4c7b56d commit ee32c27

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

protobuf-plugin/src/main/kotlin/kotlinx/rpc/protobuf/ProtoToModelInterpreter.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ class ProtoToModelInterpreter(
2525
private val rootResolver = NameResolver.create(logger)
2626

2727
fun interpretProtocRequest(message: CodeGeneratorRequest): Model {
28-
return Model(message.protoFileList.map { it.toModel() })
28+
val protoFileMap = message.protoFileList.associateBy { it.name }
29+
30+
return Model(message.fileToGenerateList.map { protoFileMap.getValue(it).toModel() })
2931
}
3032

3133
// package name of a currently parsed file

0 commit comments

Comments
 (0)