Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 16, 2025

The FINSH_FUNCTION_EXPORT_ALIAS macro has been deprecated but 28 call sites remained across the codebase. This PR removes all references.

Changes

  • Removed macro definitions from components/finsh/finsh.h and include/rtdef.h
  • Removed 28 macro invocations across 17 source files in components and BSPs
  • Cleaned up empty #ifdef blocks left after removal (e.g., bsp/simulator/drivers/module_win32.c)

Impact

No functional changes. The macro was already defined as empty:

// Before
#define FINSH_FUNCTION_EXPORT_ALIAS(name, alias, desc)

// Typical usage (now removed)
FINSH_FUNCTION_EXPORT_ALIAS(rt_pm_dump_status, pm_dump, dump power management status);
MSH_CMD_EXPORT_ALIAS(rt_pm_dump_status, pm_dump, dump power management status);

// After - only MSH export remains
MSH_CMD_EXPORT_ALIAS(rt_pm_dump_status, pm_dump, dump power management status);

All MSH command exports remain intact and functional.

Original prompt

This section details on the original issue you should resolve

<issue_title>[clean] 清理仓库中残留 FINSH_FUNCTION_EXPORT_ALIAS 调用代码</issue_title>
<issue_description>### RT-Thread Version

master

Hardware Type/Architectures

ALL

Develop Toolchain

Other

Describe the bug

主线仓库里面中存在大量调用 FINSH_FUNCTION_EXPORT_ALIAS 的代码,
FINSH_FUNCTION_EXPORT_ALIAS 已经废除,所以需要进行清理

Other additional context

No response</issue_description>

<agent_instructions>根据 issue 情况及评论情况 进行处理。处理完成后,对代码进行review,需要按RT-Thread的风格进行review。</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@BernardXiong 由copilot尝试进行处理,不过因为中间合并的PR导致冲突。可以参考 #10843 的情况,重新进行处理。同时当处理完成后,可以对修改的代码文件进行整体重新评估,一些因为这部分修改导致的调整,可以考虑如何把代码写得更简单的方式进行处理,移除一些不必要的代码,例如:
  • #ifdef xxx #endif 中间并不存在代码的情况可以整体移除;
  • 一些由 FINSH_FUNCTION_EXPORTFINSH_FUNCTION_EXPORT_ALIAS 导出的地方,也可以对代码进行调整,导出成 msh 命令行方式的(注意函数入口不一致,需要进行转换)。</comment_new>

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link

👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread!

为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。
To ensure your code complies with RT-Thread's coding style, please run the code formatting workflow by following the steps below (If the formatting of CI fails to run).


🛠 操作步骤 | Steps

  1. 前往 Actions 页面 | Go to the Actions page
    点击进入工作流 → | Click to open workflow →

  2. 点击 Run workflow | Click Run workflow

  • 设置需排除的文件/目录(目录请以"/"结尾)
    Set files/directories to exclude (directories should end with "/")
  • 将目标分支设置为 \ Set the target branch to:copilot/clean-up-finsh-function-code
  • 设置PR number为 \ Set the PR number to:10940
  1. 等待工作流完成 | Wait for the workflow to complete
    格式化后的代码将自动推送至你的分支。
    The formatted code will be automatically pushed to your branch.

完成后,提交将自动更新至 copilot/clean-up-finsh-function-code 分支,关联的 Pull Request 也会同步更新。
Once completed, commits will be pushed to the copilot/clean-up-finsh-function-code branch automatically, and the related Pull Request will be updated.

如有问题欢迎联系我们,再次感谢您的贡献!💐
If you have any questions, feel free to reach out. Thanks again for your contribution!

Co-authored-by: BernardXiong <1241087+BernardXiong@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove deprecated FINSH_FUNCTION_EXPORT_ALIAS calls [clean] Remove deprecated FINSH_FUNCTION_EXPORT_ALIAS macro Nov 16, 2025
Copilot AI requested a review from BernardXiong November 16, 2025 14:08
Copilot finished work on behalf of BernardXiong November 16, 2025 14:08
@Maihuanyi
Copy link
Contributor

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

你好,请签署一下协议

@github-actions
Copy link

📌 Code Review Assignment

🏷️ Tag: components

Reviewers: @Maihuanyi

Changed Files (Click to expand)
  • components/dfs/dfs_v1/src/dfs_posix.c
  • components/dfs/dfs_v2/src/dfs_posix.c
  • components/drivers/mtd/mtd_nand.c
  • components/drivers/pm/pm.c
  • components/finsh/finsh.h

🏷️ Tag: components_driver_pm

Reviewers: @wdfk-prog

Changed Files (Click to expand)
  • components/drivers/pm/pm.c

📊 Current Review Status (Last Updated: 2025-11-17 15:44 CST)


📝 Review Instructions

  1. 维护者可以通过单击此处来刷新审查状态: 🔄 刷新状态
    Maintainers can refresh the review status by clicking here: 🔄 Refresh Status

  2. 确认审核通过后评论 LGTM/lgtm
    Comment LGTM/lgtm after confirming approval

  3. PR合并前需至少一位维护者确认
    PR must be confirmed by at least one maintainer before merging

ℹ️ 刷新CI状态操作需要具备仓库写入权限。
ℹ️ Refresh CI status operation requires repository Write permission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[clean] 清理仓库中残留 FINSH_FUNCTION_EXPORT_ALIAS 调用代码

4 participants