Search before asking
Version
Problem
FDL already supports qualified type names such as Outer.Inner in the normal type system, and schema validation can resolve them correctly.
But in service RPC signatures, the FDL parser currently only accepts a simple identifier for request and response types.
For example, this fails today:
package demo;
message Outer {
message HelloRequest {}
}
message ReplyEnvelope {
message HelloReply {}
}
service Greeter {
rpc SayHello (Outer.HelloRequest) returns (ReplyEnvelope.HelloReply);
}
The parser stops at the . in Outer.HelloRequest.
Why this looks like a bug
- FDL field/type parsing already accepts qualified names
- protobuf service parsing already accepts qualified RPC type names
- FlatBuffers service parsing already accepts qualified RPC type names
- the existing validator can already resolve qualified nested names
So this looks like a small inconsistency in the FDL service parser rather than an intentional limitation.
Proposed fix
Allow FDL RPC request/response type positions to parse a named type reference such as:
Request
Outer.Inner
Outer.Middle.Inner
This should be limited to parser behavior and regression coverage. No service IR or validator redesign is needed.
Component(s)
Other
Minimal reproduce step
Put this schema in repro.fdl:
package demo;
message Outer {
message HelloRequest {}
}
message ReplyEnvelope {
message HelloReply {}
}
service Greeter {
rpc SayHello (Outer.HelloRequest) returns (ReplyEnvelope.HelloReply);
}
- Parse it with the FDL parser.
- Parsing fails at the qualified request type
Outer.HelloRequest.
What did you expect to see?
I expected the schema to parse successfully, because qualified nested type names like Outer.Inner are already supported in the normal FDL type system, and service RPC signatures should be able to reference those same named types.
What did you see instead?
The parser rejected the RPC signature and stopped at the qualified type name, with an error like:
Expected ')' after request type
So FDL service RPC request/response type positions currently only accept a simple identifier, not a qualified nested type name.
Anything Else?
No response
Are you willing to submit a PR?
Search before asking
Version
Problem
FDL already supports qualified type names such as
Outer.Innerin the normal type system, and schema validation can resolve them correctly.But in service RPC signatures, the FDL parser currently only accepts a simple identifier for request and response types.
For example, this fails today:
The parser stops at the
.inOuter.HelloRequest.Why this looks like a bug
So this looks like a small inconsistency in the FDL service parser rather than an intentional limitation.
Proposed fix
Allow FDL RPC request/response type positions to parse a named type reference such as:
RequestOuter.InnerOuter.Middle.InnerThis should be limited to parser behavior and regression coverage. No service IR or validator redesign is needed.
Component(s)
Other
Minimal reproduce step
Put this schema in
repro.fdl:Outer.HelloRequest.What did you expect to see?
I expected the schema to parse successfully, because qualified nested type names like
Outer.Innerare already supported in the normal FDL type system, and service RPC signatures should be able to reference those same named types.What did you see instead?
The parser rejected the RPC signature and stopped at the qualified type name, with an error like:
Expected ')' after request typeSo FDL service RPC request/response type positions currently only accept a simple identifier, not a qualified nested type name.
Anything Else?
No response
Are you willing to submit a PR?