Commit f5d72ab
authored
fix(compiler): allow qualified nested types in FDL rpc signatures (#3518)
## Why?
FDL already supports qualified nested names like `Outer.Inner` in the
normal type system, and schema validation can resolve those names.
However, FDL service RPC parsing still only accepts a simple identifier
in request/response type positions.
That makes the FDL service parser inconsistent with:
- the rest of the FDL type system
- the existing protobuf service parser
- the existing FlatBuffers service parser
## What does this PR do?
- allows FDL RPC request/response types to parse a named type reference
such as `Request` or `Outer.Inner`
- adds a regression test for qualified request/response type names in
service parsing
- keeps the existing validator test for simple known types and adds a
separate validator test for qualified known types
This change is intentionally small and limited to the FDL service parser
path and its direct tests.
## Related issues
- [Open #<3517>](#3517)
## AI Contribution Checklist
- [x] Substantial AI assistance was used in this PR: `yes`
- [x] If `yes`, I included a completed [AI Contribution
Checklist](https://github.com/apache/fory/blob/main/AI_POLICY.md#9-contributor-checklist-for-ai-assisted-prs)
in this PR description and the required `AI Usage Disclosure`.
- [x] If `yes`, I can explain and defend all important changes without
AI help.
- [x] If `yes`, I reviewed AI-assisted code changes line by line before
submission.
- [x] If `yes`, I ran adequate human verification and recorded evidence.
- [x] If `yes`, I added or updated tests and docs where required.
- [x] If `yes`, I validated protocol or performance impacts with
evidence when applicable.
- [x] If `yes`, I verified licensing and provenance compliance.
AI Usage Disclosure
- substantial_ai_assistance: yes
- scope: limited assistance for a small parser/test change and PR
wording after manual reproduction and verification
- affected_files_or_subsystems: FDL parser, compiler service tests
- human_verification:
- reviewed all changes line by line
- from `/home/dwj/Project/apache-fory-prA/compiler` ran:
- `PYTHONPATH=/home/dwj/Project/apache-fory-prA/compiler
/home/dwj/miniconda3/bin/python3 -m pytest
fory_compiler/tests/test_fdl_service.py -q` -> `14 passed`
- `PYTHONPATH=/home/dwj/Project/apache-fory-prA/compiler
/home/dwj/miniconda3/bin/python3 -m pytest
fory_compiler/tests/test_proto_service.py -q` -> `5 passed`
- `PYTHONPATH=/home/dwj/Project/apache-fory-prA/compiler
/home/dwj/miniconda3/bin/python3 -m pytest
fory_compiler/tests/test_fbs_service.py -q` -> `5 passed`
- performance_verification: N/A
- provenance_license_confirmation: Apache-2.0-compatible provenance
confirmed; no incompatible third-party code introduced
## Does this PR introduce any user-facing change?
This introduces a small compiler-frontend behavior change: FDL service
RPC request/response type positions now accept qualified nested names
such as `Outer.Inner`.
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?1 parent 4052ca6 commit f5d72ab
File tree
2 files changed
+61
-7
lines changed- compiler/fory_compiler
- frontend/fdl
- tests
2 files changed
+61
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
890 | 890 | | |
891 | 891 | | |
892 | 892 | | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
| 893 | + | |
897 | 894 | | |
898 | 895 | | |
899 | 896 | | |
| |||
904 | 901 | | |
905 | 902 | | |
906 | 903 | | |
907 | | - | |
908 | | - | |
909 | | - | |
| 904 | + | |
| 905 | + | |
910 | 906 | | |
911 | 907 | | |
912 | 908 | | |
| |||
945 | 941 | | |
946 | 942 | | |
947 | 943 | | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
948 | 958 | | |
949 | 959 | | |
950 | 960 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
70 | 93 | | |
71 | 94 | | |
72 | 95 | | |
| |||
232 | 255 | | |
233 | 256 | | |
234 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
0 commit comments