Skip to content

Conversation

@wineee
Copy link
Member

@wineee wineee commented Jan 15, 2026

log: update version

Summary by Sourcery

Bump the project version and Debian packaging metadata to 0.3.1 and update the required TreelandProtocols dependency version.

Build:

  • Increase the project version in CMake configuration from 0.2.0 to 0.3.1 and require TreelandProtocols 0.5.3 instead of 0.5.0.

Deployment:

  • Align Debian packaging changelog with the new 0.3.1 release version.

@deepin-ci-robot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@github-actions
Copy link

TAG Bot

TAG: 0.3.1
EXISTED: no
DISTRIBUTION: unstable

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wineee

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

@sourcery-ai
Copy link

sourcery-ai bot commented Jan 15, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Update DDM project version and TreelandProtocols dependency requirement to align with the 0.3.1 release and associated protocol changes.

File-Level Changes

Change Details Files
Bump project version and TreelandProtocols dependency requirement for the DDM build configuration.
  • Update CMake project version from 0.2.0 to 0.3.1 to reflect the new DDM release.
  • Increase the minimum required TreelandProtocols package version from 0.5.0 to 0.5.3 in the CMake build configuration.
CMakeLists.txt
debian/changelog

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

@zccrs zccrs marked this pull request as ready for review January 15, 2026 07:29
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@wineee wineee force-pushed the tag-0.3.1 branch 4 times, most recently from 5f873da to 7cd8386 Compare January 15, 2026 08:55
@deepin-ci-robot
Copy link

deepin pr auto review

这段代码主要对项目的版本管理方式进行了重构,并更新了依赖项。以下是对该 diff 的详细审查意见,分为语法逻辑、代码质量、代码性能和代码安全四个方面:

1. 语法逻辑

  • 版本管理逻辑优化(改进)

    • 变更点:删除了手动定义的 DDM_VERSION_MAJORDDM_VERSION_MINORDDM_VERSION_PATCHDDM_VERSION_STRING,转而直接使用 project() 命令中定义的 VERSION 0.3.1,并通过 ${DDM_VERSION} 变量引用。
    • 审查意见:这是正确且推荐的做法。CMake 的 project() 命令会自动定义 <PROJECT-NAME>_VERSION (即 DDM_VERSION) 以及 <PROJECT-NAME>_VERSION_MAJOR 等变量。利用 CMake 原生变量可以避免手动维护版本号不一致的风险,逻辑更加统一。
    • 潜在风险:在 data/DDMConfig.cmake.in 文件中,仍然保留了 set(DDM_VERSION_MAJOR @DDM_VERSION_MAJOR@) 等行。
      • 问题:虽然 CMakeLists.txt 中删除了这些变量的显式定义,但由于 project() 会自动生成它们,这些引用在配置文件中依然有效。然而,如果后续开发者误以为这些变量已被废弃而删除了 project() 中的版本号,或者 CMake 版本行为发生变化,可能会导致配置文件出错。
      • 建议:建议确认 data/DDMConfig.cmake.in 中是否真的需要拆分的 MAJOR/MINOR/PATCH 变量。如果不需要,建议统一使用 @DDM_VERSION@,保持与 CMakeLists.txt 一致,减少维护成本。
  • 依赖版本更新

    • 变更点find_package(TreelandProtocols 0.5.0 REQUIRED) 更新为 find_package(TreelandProtocols 0.5.3 REQUIRED)
    • 审查意见:语法正确,符合 CMake 标准用法。

2. 代码质量

  • 一致性(改进)

    • 变更点:将所有文件(CMakeLists.txt, DDMConfig.cmake.in, man pages)中的版本引用统一为 DDM_VERSION
    • 审查意见:提高了代码的一致性和可维护性。修改版本号时只需修改 project() 处的一处即可。
  • 配置文件清理(建议)

    • 观察data/DDMConfig.cmake.in 中同时保留了 @DDM_VERSION_MAJOR@ 等拆分变量和 @DDM_VERSION@
    • 建议:如果下游使用者不需要拆分的版本号,建议移除 set(DDM_VERSION_MAJOR ...) 这三行,仅保留 set(DDM_VERSION @DDM_VERSION@),保持配置文件的简洁。

3. 代码性能

  • 构建性能
    • 审查意见:这次变更主要涉及元数据处理,减少了几个 set 和字符串拼接操作。这对编译时间的影响微乎其微,可以忽略不计,但在逻辑上略微精简了处理流程。

4. 代码安全

  • 版本一致性安全

    • 审查意见:通过移除手动定义的版本字符串变量,降低了人为拼写错误或忘记同步更新某个版本变量的可能性。这属于“供应链安全”中的版本完整性范畴,是正向的改进。
  • 依赖安全性

    • 变更点:升级了 TreelandProtocols 的依赖版本。
    • 审查意见:通常升级依赖库版本是为了修复安全漏洞或获取新功能。从 0.5.0 升级到 0.5.3 看起来是一个补丁更新,符合安全最佳实践。

总结与改进建议

总体而言,这是一次高质量的重构,将版本管理回归到了 CMake 的标准做法上,提高了项目的可维护性。

具体的改进建议如下:

  1. 清理 data/DDMConfig.cmake.in
    建议检查 DDMConfig.cmake.in 的使用者。如果不需要 MAJOR, MINOR, PATCH 单独变量,建议删除它们,代码如下:

    # data/DDMConfig.cmake.in
    # 删除以下三行(如果不需要):
    # set(DDM_VERSION_MAJOR @DDM_VERSION_MAJOR@)
    # set(DDM_VERSION_MINOR @DDM_VERSION_MINOR@)
    # set(DDM_VERSION_PATCH @DDM_VERSION_PATCH@)
    
    set(DDM_VERSION @DDM_VERSION@)
    
    # ... 其余代码
  2. 验证 PROJECT_VERSION 变量的可用性
    虽然现代 CMake(3.x)普遍支持 <PROJECT-NAME>_VERSION,但为了绝对稳健,可以在 CMakeLists.txt 中显式声明对 CMake 版本的要求(代码中已有 cmake_minimum_required(VERSION 3.25.0),这已经足够高,完全支持该特性),无需额外操作。

  3. Debian Changelog 日期检查
    diff 中的 debian/changelog 显示日期为 Thu, 15 Jan 2026。如果这是为了将来的提交,那是正常的;如果是当前提交,请确认日期是否为笔误(当前年份应为 2023 或 2024 等)。虽然这不影响代码逻辑,但属于打包规范问题。

@zccrs zccrs merged commit 6f8086b into linuxdeepin:master Jan 15, 2026
8 of 10 checks passed
@wineee wineee deleted the tag-0.3.1 branch January 15, 2026 14:08
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