cloudwego / volo

Rust RPC framework with high-performance and strong-extensibility for building micro-services.
https://crates.io/crates/volo
Apache License 2.0
2.13k stars 166 forks source link

feat(volo-build): support deduplication of same item for config builder #432

Closed Ggiggle closed 1 month ago

Ggiggle commented 1 month ago

Motivation

IDL reference might introduce repeated item definition with same namespace, which would lead to the codegen problem of repeated structure definition. Sometimes, it is caused by repeated reference of third-party idls, which can't be changed, and in this case, we should deduplicate these same items for corrected codegen.

Solution

Under the assumption that the items with same defined name and namespace are completely consistent in semantics, we would only generate the struct definition for the first item in idl.