-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I can't refer between proto files with imports:
// message.proto
message Msg {
required string name = 1;
extensions 100 to 199;
}
extend Msg {
optional bool sameFile = 105;
}
// extension.proto
import "message.proto";
message Test {
required Msg msg = 1;
}
extend Msg {
optional string extn = 101;
}running hprotoc -d hs *.proto gives:
Loading filepath: "/home/.../tst/extension.proto"
Loading filepath: "/home/.../tst/message.proto"
hprotoc: user error (Parsing proto:
"extension.proto"
has failed with message
Text.ProtocolBuffers.ProtoCompile.Resolve annErr: fqFileDP FileDescriptorProto (name,package) is (Just "extension.proto",Nothing)
Text.ProtocolBuffers.ProtoCompile.Resolve annErr: fqMessage DescriptorProto name is Just "Test"
Text.ProtocolBuffers.ProtoCompile.Resolve annErr: fqField FieldDescriptorProto name is Just "msg"
Text.ProtocolBuffers.ProtoCompile.Resolve fatal error encountered, message:
resolvePredEnv: Could not lookup "Msg"
which parses as (False,[IName "Msg"])
in environment: .Extension.Test in "extension.proto"
looking for: Message or Group or Enum
allowed (local): [([IName "Extension",IName "Test"],[IName "msg"])]
allowed (global): [(PackageID {getPackageID = [IName "Extension"]},[IName "Test",IName "extn"]),(PackageID {getPackageID = [IName "Message"]},[IName "Msg",IName "sameFile"])]
)
It works fine with protoc and running hprotoc -d hs message.proto also works as expected.
Appolgies if this isn't the right place to post bug (or if it's user error!)
Metadata
Metadata
Assignees
Labels
No labels