The GitHub Actions job "Fory CI" on fory.git/main has failed.
Run started by GitHub user chaokunyang (triggered by chaokunyang).

Head commit for run:
5971ded1da4a9b308620388546f581e7c90188df / Peiyang He 
<[email protected]>
feat(compiler): support C++ gRPC code generation (#3877)

## Why?

Support C++ gRPC code generation.

## What does this PR do?

### Overview

This PR adds C++ gRPC code generation support. 
All unary, server-streaming, client-streaming, and bidirectional RPC
types are supported.
They integrate with gRPC C++ synchronous APIs.

### Fory-backed codec

Generated gRPC code uses Fory as codec. Given that the codec is
relatively small, it is generated directed within each
`*_service_grpc.h`.
On writes, codec moves serialized bytes into a gRPC `Slice`, avoiding an
additional outbound payload copy. On reads, it uses a single
`ByteBuffer` slice when possible and merges fragmented buffers only when
necessary.

### Error-handling

To make the logic more robust, this PR also adds gRPC-related naming
collision detection and escaping.
This PR also considers special characters of C++ such as compilation
guards.
Generated model and service headers use sanitized include guards; 
the shared Fory codec is protected by
`FORY_GENERATED_GRPC_SERIALIZATION_TRAITS_`;
each `grpc::SerializationTraits<T>` specialization has a stable,
type-specific guard derived from a sanitized fully qualified type name
and a SHA-256 prefix. This prevents duplicate specializations when
several generated service headers use the same message type.

### Testing

This PR adds compiler-side pytests and C++-Java gRPC interop tests. It
also adds a dedicated job in the CI.

### Documentation

This PR adds documentation for the usage and example of the C++ gRPC
code generation feature.


## Related issues

Close https://github.com/apache/fory/issues/3276.

## AI Contribution Checklist

- [ ] Substantial AI assistance was used in this PR: `yes` / `no`
- [ ] 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`.
- [ ] If `yes`, my PR description includes the required `ai_review`
summary and screenshot evidence or equivalent persisted links of the
final clean AI review results from both fresh reviewers described in
`AI_POLICY.md`, the Fory-guided reviewer and the independent general
reviewer, on the current PR diff or current HEAD after the latest code
changes.


## Does this PR introduce any user-facing change?

N/A.

## Benchmark

N/A.

Report URL: https://github.com/apache/fory/actions/runs/30758473904

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to