test(grpc): 新增 grpc-codegen 成员 —— 一条依赖经已发布索引拿到整条工具链 - #174
Open
Sunrisepeak wants to merge 5 commits into
Open
Conversation
这是唯一能证明 `reexport = true` 真的经由已发布索引到达消费者的地方:mcpp 自己的
e2e 用的都是 path 依赖,grpc-m 的 examples/greeter 也是(它要测工作树)。
成员只声明:
[target.'cfg(linux)'.dependencies.grpc]
grpc = { version = "1.83.0", features = ["codegen"] }
build.mcpp 一行 `grpcgen::generate_all()`,proto/ 里放一个 echo.proto,断言生成的
**service** stub 能用(`echotest.Echo`)—— 只跑 protoc 而没跑 grpc 插件的话,
`Echo::service_full_name()` 根本不存在,所以半配置的 codegen 过不了这条。
它同时覆盖 `rerun_if_changed_glob`:文件清单没有写在任何地方。
顺带改掉两处已被本次推翻的陈述:
* grpc-module 里「gRPC's codegen needs host tools mcpp cannot hand a consumer」
—— 自 mcpp 2026.8.6.2 起不再成立,reexport 正是把它们交出去的机制;
* grpc.lua 头部还写着「归档换成 v1.83.0-2」,现已是 -3。
本机已跑通:service = echotest.Echo / grpc-codegen: OK。
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。
openssl 的 `assert.h: No such file or directory` 根因是 gcc alias 把安装机的 subos sysroot 写死了;#463 已合入并进入已发布索引(artifact xim-index-5f383b5 里可见 XLINGS_DYNAMIC_SUBOS_DIR)。此前那轮 job 起于修复传播之前。
Failed to resolve action download info. Error: Service Unavailable 与改动无关;`gh run rerun` 对该 run 不可用,故以空提交触发。
官方状态页确认 Actions partial_outage;上一轮 select 死于 `Failed to resolve action download info: Service Unavailable`,lint 被连带取消, workspace 因此全部 skip。与改动无关。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
补上 #172 里说明过要单独提的那个成员。当时提不了,是因为它要证明的正是「
reexport经由已发布索引到达消费者」,而那时mcpplibs.grpcgen还解析到线上的-2。-3现已发布并传播。它是唯一能证明这件事的地方
mcpp 自己的 e2e(193)用 path 依赖;grpc-m 的
examples/greeter也用 path 依赖(它要测工作树)。两者都不经过索引。这个成员只声明一条:
build.mcpp 一行
grpcgen::generate_all(),proto/里一个echo.proto。protoc、grpc_cpp_plugin、grpcgen 规则模块全部由 grpc 包交过来,manifest 里一个字都没提。断言选的是 service,不是 message
只跑 protoc 而没跑 grpc 插件的话,
Echo::service_full_name()根本不存在 —— 半配置的 codegen 编译期就过不去。同时它覆盖rerun_if_changed_glob:文件清单没有写在任何地方。本机已跑通:
顺带两处过时陈述
tests/examples/grpc-module/mcpp.toml:「gRPC's codegen needs host tools mcpp cannot hand a consumer」—— 自 mcpp 2026.8.6.2 起不成立,reexport = true正是把它们交出去的机制;pkgs/g/grpc.lua头部仍写着「归档换成 v1.83.0-2」,现已是-3。