已合并
fix: honor ENABLE_TRACE_LOG option on develop #394
fix: honor ENABLE_TRACE_LOG option on develop #394
已合并
Robell创建于 7月21日
Robell
7月21日

合入来源

问题/功能描述

develop 分支根目录的 CMakeLists.txt 定义了 ENABLE_TRACE_LOG,但条件判断错误使用 ENABLE_TRACE_L0G,导致启用 trace log 时不会添加 LOG_TRACE_INFO_ENABLED 编译定义。

修改方案描述

仅将条件变量更正为 ENABLE_TRACE_LOG,使声明的构建开关与实际条件保持一致。

是否涉及 UT/ST

开发自检

验证

  • cmake --trace-expand --trace-source=CMakeLists.txt -S . -B build-codex-trace-green -DENABLE_TRACE_LOG=ON -DBUILD_PYTHON=OFF -DBUILD_GIT_COMMIT=OFF:trace 确认执行 add_definitions(-DLOG_TRACE_INFO_ENABLED)
  • pre-commit run --files CMakeLists.txt
  • git diff --check

环境限制

本机 CMake 配置在验证目标宏定义后,因既有 3rdparty/log 的 spdlog 目录创建失败而中断;完整 Linux/Ascend 构建由 CI 覆盖。

likedislike
Pull Request已成功合入, 合并人@zhangjinshi
(感谢 Robell 的贡献)
RRobell
7月21日 关联了issue:[Bug-Report|缺陷反馈]: ENABLE_TRACE_LOG 未生效
atomgit-bot
atomgit-bot
7月21日 评论:

变更摘要

本次变更修复了 develop 分支上 CMakeLists.txt 中的一个拼写错误:CMake 选项 ENABLE_TRACE_LOG 被误写为 ENABLE_TRACE_L0G(字母 O 被写成了数字 0),导致 trace log 功能对应的宏 LOG_TRACE_INFO_ENABLED 无法被正确启用。修复后,ENABLE_TRACE_LOG=ON 可以正常传递至 add_definitions(-DLOG_TRACE_INFO_ENABLED),恢复 trace log 的预期行为。

主要改动

  • 修复 CMake 选项名拼写错误:将 CMakeLists.txt 中的 ENABLE_TRACE_L0G 更正为 ENABLE_TRACE_LOG,使选项名与构建命令中的参数一致,确保 LOG_TRACE_INFO_ENABLED 宏能被正确定义。
likedislike
atomgit-bot
atomgit-bot
7月21日 评论:

代码审查

✅ 未发现问题

likedislike
ascend-robot
ascend-robot成员
7月21日 评论:
流水线 PR-pipeline_memcache#1588 [ commitID:20f7ab5b ] 已完成
阶段 任务名 状态 详情
编译构建 Build_memcache >>>
恶意代码检查 Antipoison_memcache >>>
编码安全与规范检查 pre-commit >>>
CodeCheck_memcache >>>
开源片段检查 SCA_memcache >>>
开发者测试 UT_memcache >>>
流水线 PR-pipeline_memcache >>>
此流水线已支持下列评论快捷指令,仅PR创建者和白名单成员评论有效
  • compile : 运行流水线
  • retry : 重试流水线所有失败子任务
  • retry <任务名> : 仅重试指定失败子任务
  • stop : 停止流水线
likedislike
ascend-robotascend-robot成员
7月21日 添加了label:ascend-cla/yes
ascend-robotascend-robot成员
7月21日 添加了label:ci-pipeline-running
ascend-robot
ascend-robot成员
7月21日 评论:

CLA Signature Pass

gcw_oroHQZs3, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
ascend-robot
ascend-robot成员
7月21日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here
You can get sig-info at here


PR Approval Progress

⚠️ This PR does not yet meet the following requirements:lgtm (requires ≥ 3 person(s) per module)、approve (requires ≥ 1 person(s) per module)

Module Approval Details

module lgtm status approve status
repo-Ascend/memcache ❌ (0/3)(You can also ask: zja4gitcode, shilinlee_com, lululuwenbo, chenyz6, east-yuan) ❌ (0/1)(You can also ask: 康富安, yuncliu, weihaoran1, 程俊华, 于书苹)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)
likedislike
RRobell
7月21日 修改了pull request 的描述
ascend-robotascend-robot成员
7月21日 删除了label:ci-pipeline-running
ascend-robotascend-robot成员
7月21日 添加了label:ci-pipeline-passed
Zzhangjinshi成员
7月22日 通过审查
Yyangqi成员
7月22日 将yangqi12138设为评审人
Yyangqi成员
7月22日 通过了评审
Zzhangjinshi成员
7月22日 关闭了关联的issue
Zzhangjinshi成员
7月22日 合入了pull request