Pull Request已成功合入, 合并人@cangjie-ci
(感谢 yanjs 的贡献)PR创建成功通知 | 感谢您的贡献 🎉
您好!系统已检测到您成功创建 Pull Request(PR),感谢您对项目的支持与参与!以下几点需要您着重关注:
一、PR必须关联Issue ❗️
触发门禁检查的必要步骤:在PR描述框输入Issue完整链接,完成Issue关联。
请注意,一个 Issue 不能同时关联同一 base 仓库内同一个分支的多个开启状态的 PR
二、门禁触发规则 🔧
- 门禁类型判定:由Issue关联的PR所属代码仓数量决定
- 关联多个代码仓PR:触发「多仓联合门禁」
- 关联单个代码仓PR:触发「单仓门禁」
- 启动指令与检查范围:需主动回复指令:
- 回复 "start build":执行Cangjie的主要基础检查,包含commit格式检查、静态告警分析、OAT开源声明检查、多平台构建、单元/集成测试等
- 关联同一issue的多个PR,仅需在任意一个PR里回复触发一次门禁,该PR门禁通过后,所有PR都会添加Label和测试人
- 每个pr只能同时运行一条CI流水线,如需重新启动,请先关闭运行中的,再评论触发门禁
- Markdown修改仅触发文档类构建测试门禁,不会触发Cangjie的编译测试门禁
- commit 信息格式请遵循:Conventional Commits 规范
- 请保证每一条 commit 都已添加
Signed-Off-By信息 - 回复 "start build cov":执行覆盖率构建工程,生成该提交的增量代码覆盖率报告
三、合入条件 ⚠️
- 满足最低评审人数,且评审问题需全部解决;
- 禁止合入本人创建的PR,需由其他协作者操作;
- 合并前确保关联流水线任务运行成功(build-test-passed);
- 需求类覆盖率门禁:当关联的 Issue 标题以
[feature]:开头(需求类 Issue)时,联合提交中属于cangjie_compiler、cangjie_runtime、cangjie_stdx、cangjie_tools、llvm-project仓库的 PR,必须先回复 "start build cov" 触发增量覆盖率流水线并通过,使 PR 获得cov-test-passed标签后方可合入。
四、合并PR ✅
回复 "start merge",CI流水线会自动检查所有关联PR的状态、版本号标签、检视意见密度、兼容性、需求类覆盖率门禁,若所有PR都满足合并条件,则将会同时合并所有PR。若存在不满足合并条件的PR,则不会合并任何PR。
如果希望不进行兼容性相关的检测,请任一合法审查人复制以下内容,在 start merge 前提交评论:
本 pr 不需要兼容性相关检测,对于引发的任何兼容性问题(即由于本 pr 合入将导致用户需适配代码的话),由本人承担。
If you wish to avoid compatibility-related checks, please have any approver copy the following content and submit it as a comment before sending start merge:
This PR does not require compatibility-related checks. For any compatibility issues caused by this PR (i.e., if the integration of this PR will require users to adapt their code), I will take full responsibility.
五、补充说明 📢
- 详细仓颉贡献流程:贡献流程(Cangjie Community Contribution)
- 门禁结果将自动评论至关联的所有PR,敬请留意。


start build


🔨 构建/测试门禁流水线
已启动,正在后台运行中,您可以点击构建/测试门禁详情查看运行状态。
构建/测试门禁执行流程:
graph LR
A[PR检测] --> B[联合构建]
B[联合构建] --> C[测试运行]
检查内容包括
- commitlint检查
- 构建任务
- linux x64、mac aarch64、windows x64
- 测试任务
- UT、HLT、LLT
构建/测试门禁产物归档路径: obs://cangjie103/CangjieDaily/pub/ci/gate/release/1.1/llvm-project/613


PR&issue 合规检查结果 / PR & Issue Compliance Check Results
| Item | Target | Result | Notes |
|---|---|---|---|
| PR template | PR: Cangjie/llvm-project#613 | SKIP | 标签含 sync,跳过 / sync tag, skipped |
| Issue template | Issue: Cangjie/cangjie_compiler#459 | PASS | 必填字段齐全 / required fields ok |
| PR-Issue consistency | PR: Cangjie/llvm-project#613 | SKIP | 标签含 sync,跳过 / sync tag, skipped |
检查结论 / Conclusion: PASS


🔨 构建/测试门禁
⚠️ 构建/测试门禁失败,请点击 🔍 构建/测试门禁详情 查看完整错误信息


start merge


⏳ 正在进行兼容性检测中,可能需要2~3分钟,请稍候,若10分钟无检测结果,请重新回复 start merge。
⏳ Compatibility check in progress. It may take 2–3 minutes. Please wait. If there is no result after 10 minutes, please reply with start merge again.


[兼容性平台] 抱歉,由于服务异常,本次兼容性检测未能完成。
请重新评论 start merge 触发检测。


start merge


⏳ 正在进行兼容性检测中,可能需要2~3分钟,请稍候,若10分钟无检测结果,请重新回复 start merge。
⏳ Compatibility check in progress. It may take 2–3 minutes. Please wait. If there is no result after 10 minutes, please reply with start merge again.


✅ 合入前兼容性检测通过。
涉及仓库:Cangjie/llvm-project
结论
- 分析过程:分析了 Cangjie/llvm-project#613 的提交、变更文件及 llvm/lib/Transforms/Scalar/CJDevirtualOpt.cpp 中的 subtype 推断路径,并核对扩展定义的 where 条件表示与运行时调用保留路径。 / Reviewed the commit, changed file, subtype inference, where-condition representation and retained runtime-call path.
- 原因:该 PR 在类型参数或扩展定义缺少初始化信息、或扩展定义带有 where 条件时,不再将 CJ_MCC_IsSubType 折叠为常量;其余折叠路径保持不变。变更未修改公开声明、跨组件符号或 ABI,受影响的调用保留运行时判断,旧源码和旧二进制接口无需迁移。 / The change avoids constant folding when required information is unavailable or a where-condition applies. It preserves the other folding paths and does not require source or binary interface migration.
- 结论:兼容


⚠️ 以下PR不具备合入条件,无法自动合并:
- Cangjie/llvm-project#613: fix: fold is_subtype
原因: PR不具备合入条件:审查人未通过
⚠️ The following PRs are not mergeable, cannot auto-merge:
- Cangjie/llvm-project#613: fix: fold is_subtype
Reason: PR is not mergeable: Approvers not passed


start merge


⏳ 正在进行兼容性检测中,可能需要2~3分钟,请稍候,若10分钟无检测结果,请重新回复 start merge。
⏳ Compatibility check in progress. It may take 2–3 minutes. Please wait. If there is no result after 10 minutes, please reply with start merge again.


✅ 合入前兼容性检测通过。
涉及仓库:Cangjie/llvm-project
结论
- 分析过程:分析了 Cangjie/llvm-project#613 的提交、变更文件及 llvm/lib/Transforms/Scalar/CJDevirtualOpt.cpp 中的 subtype 推断路径,并核对扩展定义的 where 条件表示与运行时调用保留路径。 / Reviewed the commit, changed file, subtype inference, where-condition representation and retained runtime-call path.
- 原因:该 PR 在类型参数或扩展定义缺少初始化信息、或扩展定义带有 where 条件时,不再将 CJ_MCC_IsSubType 折叠为常量;其余折叠路径保持不变。变更未修改公开声明、跨组件符号或 ABI,受影响的调用保留运行时判断,旧源码和旧二进制接口无需迁移。 / The change avoids constant folding when required information is unavailable or a where-condition applies. It preserves the other folding paths and does not require source or binary interface migration.
- 结论:兼容


✅ 以下PR将同时合入:
- Cangjie/llvm-project#613: fix: fold is_subtype
✅ The following PRs will be merged simultaneously:
- Cangjie/llvm-project#613: fix: fold is_subtype


Change Details (Required)
问题出现在目前我们在去虚化pass消除isSubType的时候,通过extensiondef 判断两个interface的继承关系。
当出现where语句的时候,例如issue中用例:
interface I1 {}
interface I2 {}
interface I3 {}
interface I4 {}
interface I5 {}
open class CBase {}
class CA <: CBase & I1 {}
extend CA <: I5 where T <: I4 {}
extend CA <: I4 {}
extend CA <: I2 {}
extend CBase <: I3 where T <: I3 {}
extend Float64 <: I3 {}
extend Bool <: I4 {}
func test() {() is I5) { is I5")
if (CA
println("CA
}
}
main() { = CA()
let x: CA
if (x is I5) {
println("x is I5")
}
0
}
会生成extension def,但是实际是否继承需要去判断extension def中的where condition。
Change Type (Required)
Please describe the type of changes in this Pull Request (reason). Simply save and click the checkbox, or when editing, change
[ ]to[x]for the relevant item.Self-Check of Changes (Required)
Please do not modify or delete the following options. Simply save and click the checkbox, or when editing, change
[ ]to[x]for the relevant item.Local Compilation Verification Results:
Local Test Case Verification Results:
Related Issues (Required)
https://gitcode.com/Cangjie/cangjie_compiler/issues/459