Skip to content

refactor: remove daemon and searcher projects for index merge - #261

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:develop/snipe-20260923from
wangrong1069:pr0923
Sep 23, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:develop/snipe-20260923from
wangrong1069:pr0923

Conversation

@wangrong1069

@wangrong1069 wangrong1069 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Remove the daemon and searcher subprojects in preparation for the upcoming index service consolidation. Shared mount_info and utils files are moved into server. Unused config files and the daemon stress test are also dropped.

移除 daemon 和 searcher 子项目,为后续索引服务合并做准备。
将共享的 mount_info 与工具文件迁移至 server 目录下,同时删除
未使用的配置文件和 daemon 压测脚本。

Log: 移除 daemon 和 searcher 项目
PMS: TASK-395961
Influence: 不再构建 deepin-anything-daemon 与 deepin-anything-searcher 可执行文件;server 保持原有功能不变,构建依赖相应减少。

Summary by Sourcery

Consolidate the index-related codebase by removing the daemon and searcher projects and retaining their shared server utilities in the server component.

Enhancements:

  • Remove the daemon and searcher subprojects and their associated build, service, packaging, and source files.
  • Move shared mount information and utility code into the server project while preserving server functionality.

Build:

  • Reduce project build outputs and dependencies by no longer building the daemon and searcher executables and removing obsolete configuration and packaging files.

Tests:

  • Remove the obsolete daemon stress test.

Remove the daemon and searcher subprojects in preparation for the
upcoming index service consolidation. Shared mount_info and utils
files are moved into server. Unused config files and the daemon
stress test are also dropped.

移除 daemon 和 searcher 子项目,为后续索引服务合并做准备。
将共享的 mount_info 与工具文件迁移至 server 目录下,同时删除
未使用的配置文件和 daemon 压测脚本。

Log: 移除 daemon 和 searcher 项目
PMS: TASK-395961
Influence: 不再构建 deepin-anything-daemon 与 deepin-anything-searcher
可执行文件;server 保持原有功能不变,构建依赖相应减少。
@sourcery-ai

sourcery-ai Bot commented Sep 23, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The PR removes the daemon and searcher projects and their build/package/test artifacts, then consolidates the shared mount-info and utility code under server with updated CMake and include paths so the server remains buildable without the retired subprojects.

File-Level Changes

Change Details Files
Remove the daemon and searcher components from the build and source tree.
  • Stop configuring both subprojects from the top-level CMake build.
  • Delete daemon/searcher targets, source code, headers, service/package metadata, and related test assets.
  • Update Debian packaging to stop installing or depending on removed artifacts.
src/CMakeLists.txt
src/daemon/CMakeLists.txt
src/daemon/deepin-anything-daemon.pc.in
src/daemon/deepin-anything-daemon.service
src/daemon/include/**
src/daemon/src/**
src/searcher/CMakeLists.txt
src/searcher/main.cpp
src/searcher/searcher.cpp
src/searcher/searcher.h
debian/control
debian/deepin-anything-server.install
debian/deepin-anything-server.links
tests/stress_stop_start.sh
Relocate shared mount and utility implementation files into the server project while preserving server compilation.
  • Compile mount_info.c and tools.c from the server directory.
  • Adjust server include paths and source includes to use the new local header locations.
  • Update tools.h and mount_info.c include references after the move.
src/server/CMakeLists.txt
src/server/event-dispatcher.c
src/server/mount_info.c
src/server/tools.c
src/server/tools.h
src/daemon/src/core/mount_info.c
src/daemon/src/utils/tools.c
src/daemon/include/utils/tools.h
Remove obsolete repository configuration files no longer needed after project consolidation.
  • Delete unused file-type configuration and dictionary data.
config/dict.utf8
config/filetypes.cfg

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="src/CMakeLists.txt" line_range="19-22" />
<code_context>

 add_compile_options(-Wall -Wextra -pedantic -Werror)

-add_subdirectory("daemon")
 add_subdirectory("server")
 add_subdirectory("kernelmod")
-add_subdirectory("searcher")
 add_subdirectory("logger")
 add_subdirectory("dispatcher")
</code_context>
<issue_to_address>
**nitpick:** AGENTS.md still documents `src/daemon/` and `src/searcher/` as active subprojects even though these directories are no longer added to the build and their source trees were deleted, so contributor guidance points to nonexistent projects.

**Suggested fix:** Update AGENTS.md to remove the deleted daemon and searcher project descriptions and revise the repository layout.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread src/CMakeLists.txt
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

AI 代码审查报告

项目: linuxdeepin/deepin-anything
PR: #261
分支: pr0923 → develop/snipe-20260923
作者: wangrong1069
提交: refactor: remove daemon and searcher projects for index merge
审查时间: 2026-09-23


总体评分

维度 评分 状态
语法逻辑 25/25 ✓
代码质量 25/25 ✓
代码性能 20/20 ✓
代码安全 30/30 ✓
总分 100/100 ✓ 优秀

总体评价

本次 PR 为重构操作,移除了 daemon 和 searcher 子项目以进行索引合并。变更内容包括:删除 src/daemon/ 目录下的全部源文件、头文件和构建配置;删除配置文件 config/dict.utf8 和 config/filetypes.cfg;同步更新 debian/control、debian/deepin-anything-server.install 和 src/CMakeLists.txt 中的相关引用。所有删除操作与构建配置修改保持一致,未发现遗留引用或不一致问题。未发现安全漏洞。


漏洞统计

统计项 数量
当前漏洞总数 0
新增漏洞 0
修复漏洞 0
持平漏洞 0

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个


维度1:语法逻辑(25/25)✓

语法正确,逻辑清晰

审查内容:

  1. src/CMakeLists.txt:移除 add_subdirectory("daemon") 和 add_subdirectory("searcher") 语句,语法正确,保留了 server、kernelmod、logger、dispatcher 子目录的引用
  2. debian/control:移除 qt6-base-dev | qtbase5-dev、liblucene++-dev、libboost-filesystem-dev、libspdlog-dev 四项构建依赖,格式正确,缩进一致
  3. debian/deepin-anything-server.install:移除 /usr/bin 和 /usr/lib/systemd/user/deepin-anything-daemon.service 两行,保留 /usr/libexec、/usr/lib/systemd/system/deepin-anything-logger.service、/usr/share,格式正确
  4. 所有被删除的文件均为完整删除,不存在部分删除导致的语法断裂问题

结论:无编译错误,逻辑合理,边界处理完善


维度2:代码质量(25/25)✓

代码结构清晰,无重复代码,可读性好

审查内容:

  1. 删除一致性:构建依赖(debian/control)、安装文件(debian/deepin-anything-server.install)、CMake 构建脚本(src/CMakeLists.txt)三处修改与文件删除操作完全同步,无遗留引用
  2. 配置文件清理:config/dict.utf8(拼音字典)和 config/filetypes.cfg(文件类型映射配置)随 daemon 项目一并删除,无残留无用配置
  3. systemd 服务清理:删除 deepin-anything-daemon.service 文件和对应的 .links 符号链接文件,服务注册和启用配置同步移除
  4. 无残留调试代码:被删除的源文件中虽包含注释掉的调试代码(如 log.h 中大量注释代码),但随文件删除一并清理,不影响项目质量

结论:删除操作完整、一致,无遗留问题


维度3:代码性能(20/20)✓

性能良好,资源使用合理

审查内容:

  1. 移除 daemon 和 searcher 子项目后,减少了编译目标和二进制体积
  2. 构建依赖减少(移除 Qt、Lucene++、Boost、spdlog),降低了构建复杂度和时间
  3. 运行时减少了系统服务数量(移除 deepin-anything-daemon 用户级 systemd 服务),降低了内存和 CPU 开销
  4. 无性能退化风险

结论:无性能瓶颈,移除冗余组件有助于整体性能提升


维度4:代码安全(30/30)✓

存在0个安全漏洞

审查内容:

  1. 本次变更为纯删除操作,不引入任何新的代码逻辑,因此不产生新的安全漏洞
  2. 被删除的 daemon 代码中包含 D-Bus 系统总线通信(config.cpp 中的 g_bus_get_sync)、文件系统遍历(base_event_handler.cpp 中的 recursive_directory_iterator)、内核 Netlink 通信(vfs_genl.h)等功能,移除这些代码反而减少了攻击面
  3. debian/control 移除的构建依赖不影响安全 posture
  4. systemd 服务文件删除后,不再有对应的运行时权限暴露

结论:无安全风险,安全合规


审查结论

本次 PR 是一个干净的重构操作,目的是移除 daemon 和 searcher 子项目以进行索引合并。所有变更均为删除操作和对应的构建配置更新,修改一致性良好,无遗留引用,无安全漏洞。建议合并。


本报告由 AI 代码审查系统自动生成

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lzwind, wangrong1069

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wangrong1069

Copy link
Copy Markdown
Contributor Author

/merge

@deepin-bot
deepin-bot Bot merged commit 7bb0e53 into linuxdeepin:develop/snipe-20260923 Sep 23, 2026
17 checks passed
@wangrong1069
wangrong1069 deleted the pr0923 branch September 23, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants