Skip to content

Commit c83b08f

Browse files
committed
fix(grpc-codegen): windows 上带上规则包,让成员退化成可见的跳过
CI:`build.mcpp:8:8: fatal error: module 'grpcgen' not found`。 成员照抄 grpc-module 把 grpc 依赖放在 cfg(linux)/cfg(macos) 下(compat.openssl 没有 windows 条目),但 grpc-module **没有 build.mcpp**;本成员有,而 `import grpcgen;` 是**编译期**依赖 —— docs/01 §4.2 明令不得用 #if 包裹 import, 所以运行期的守卫救不了它。 grpcgen 是纯 C++23 规则包,自身没有平台受限的依赖,索引里**有 windows 条目**。 因此 windows 上单独声明它:import 成立,守在**调用**上早退。与 tests/examples/protobuf-protoc 的处理完全同形(`if target_os == windows return 0`), 成员照常构建,测试编译成一次可见的跳过。 Linux 本机复验:service = echotest.Echo / grpc-codegen: OK。
1 parent 0b9b094 commit c83b08f

3 files changed

Lines changed: 24 additions & 584 deletions

File tree

0 commit comments

Comments
 (0)