The GitHub Actions job "Fory CI" on fory.git/main has succeeded. Run started by GitHub user chaokunyang (triggered by chaokunyang).
Head commit for run: 18b821c7290843dfcdc0f6b84835c6102715a812 / Darius <[email protected]> test(compiler): add IR validation and codegen tests for gRPC service support (#3528) ## Why? Issue #3277 requires unit tests for gRPC service support in the Fory compiler: IR validation tests covering name, type, and streaming rules, and golden codegen tests for service schemas. The parser tests for FDL/proto/fbs service syntax already existed from closed sub-issues. This PR fills the remaining gaps. ## What does this PR do? **`compiler/fory_compiler/ir/validator.py`** - Added `_check_services()` implementing three validation rules: 1. Duplicate service names → error 2. Duplicate method names within the same service → error 3. RPC request/response types must be `message` — `enum` and `union` are rejected - Wired `_check_services()` into `validate()` after `_check_type_references()` **`compiler/fory_compiler/tests/test_ir_service_validation.py`** (new) - Tests for all three validation rules above, across FDL, proto, and fbs frontends - Tests that streaming RPCs (client, server, bidi) pass validation without error **`compiler/fory_compiler/tests/test_service_codegen.py`** (new) - Asserts service definitions do not alter message codegen output across all 7 language generators - Documents that `generate_services()` returns `[]` as a baseline for all generators - Verifies `compile_file(..., grpc=True)` succeeds and produces output for all languages using `examples/service.fdl` - Asserts key signatures (`class HelloRequest`, `String name`, etc.) are present in Java and Python generated output ## Related issues - Closes #3277 - Related to #3266 Report URL: https://github.com/apache/fory/actions/runs/23744117944 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
