Skip to content

Conversation

@wjyrich
Copy link
Contributor

@wjyrich wjyrich commented Nov 26, 2025

临时修复,后续再找到方法改回来。

Logs:

@sourcery-ai
Copy link

sourcery-ai bot commented Nov 26, 2025

Reviewer's Guide

This PR refines the dock task manager app item appearance by reducing the border width in QML and fixes runtime linking of taskmanager plugin libraries for unit tests by configuring explicit RPATH and linker rpath flags for the rolecombinemodel_tests and rolegroupmodel_tests CMake targets.

File-Level Changes

Change Details Files
Adjust app item border styling in the dock task manager for a thinner outline.
  • Update the QML Rectangle around app items to use a 1px border instead of 2px.
  • Preserve existing border color, transparency, and antialiasing behavior while only changing width.
panels/dock/taskmanager/package/AppItemWithTitle.qml
Configure RPATH and linker rpath options so taskmanager-related test executables can locate plugin libraries at runtime.
  • Set SKIP_BUILD_RPATH to FALSE and BUILD_WITH_INSTALL_RPATH to FALSE on the test targets so build RPATH is generated.
  • Define BUILD_RPATH to include ${CMAKE_BINARY_DIR}/plugins and ${CMAKE_BINARY_DIR}/frame for both test executables.
  • Set INSTALL_RPATH to ${CMAKE_INSTALL_PREFIX}/lib for both tests for installed runs.
  • Add target_link_options with -rpath entries for ${CMAKE_BINARY_DIR}/plugins and ${CMAKE_BINARY_DIR}/frame to ensure the linker embeds the correct runtime search paths.
tests/panels/dock/taskmanager/CMakeLists.txt

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

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 there - I've reviewed your changes - here's some feedback:

  • The test targets now configure RPATH both via set_target_properties(... BUILD_RPATH ...) and explicit target_link_options(... -rpath,...); consider consolidating to a single mechanism (preferably BUILD_RPATH/CMAKE_BUILD_RPATH) to avoid redundancy and potential divergence if one is updated without the other.
  • Hardcoding ${CMAKE_BINARY_DIR}/plugins and ${CMAKE_BINARY_DIR}/frame in the test RPATH makes the configuration less flexible; if possible, derive these paths from the corresponding plugin targets or use $ORIGIN-based paths so the tests are more robust to layout changes.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The test targets now configure RPATH both via `set_target_properties(... BUILD_RPATH ...)` and explicit `target_link_options(... -rpath,...)`; consider consolidating to a single mechanism (preferably `BUILD_RPATH`/`CMAKE_BUILD_RPATH`) to avoid redundancy and potential divergence if one is updated without the other.
- Hardcoding `${CMAKE_BINARY_DIR}/plugins` and `${CMAKE_BINARY_DIR}/frame` in the test RPATH makes the configuration less flexible; if possible, derive these paths from the corresponding plugin targets or use `$ORIGIN`-based paths so the tests are more robust to layout changes.

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.

BLumia
BLumia previously approved these changes Nov 26, 2025
@wjyrich wjyrich force-pushed the fix-build-test branch 4 times, most recently from 24982ba to 6741a3c Compare November 27, 2025 05:11
临时修复,后续再找到方法改回来。

Logs:
@deepin-ci-robot
Copy link

deepin pr auto review

我来对这个git diff进行审查:

  1. 语法逻辑分析:
  • 代码语法正确,注释掉了一行CMAKE配置参数
  • 变量定义和使用符合debian/rules的规范
  1. 代码质量改进建议:
  • 注释掉的参数-DCMAKE_SKIP_BUILD_RPATH=ON应该添加注释说明为什么被注释掉,否则其他开发者可能不清楚原因
  • 建议在文件头部添加说明文档,解释这些编译参数的作用
  1. 代码性能考虑:
  • 这个改动主要是配置层面的,对运行时性能影响不大
  • RPATH相关的设置可能会影响动态库的加载效率,但影响通常很小
  1. 安全性分析:
  • 注释掉-DCMAKE_SKIP_BUILD_RPATH=ON可能会带来一些安全考虑:
    • RPATH如果设置不当可能导致动态库劫持
    • 建议确保二进制文件的RPATH设置是安全的
    • 如果确实需要RPATH功能,建议使用相对路径而不是绝对路径

改进建议:

  1. 添加注释说明为什么注释掉这个参数
  2. 如果是为了解决特定问题,建议添加相关的bug或issue编号
  3. 考虑添加替代方案,比如使用RUNPATH代替RPATH
  4. 在安全文档中记录这个配置变更的原因和影响

示例改进后的代码:

# reproducible编译参数
# 注释掉SKIP_BUILD_RPATH是因为需要解决[bug编号]中描述的问题
# 临时启用RPATH功能,后续会寻找更安全的解决方案
#DEB_CMAKE_EXTRA_FLAGS += -DCMAKE_SKIP_BUILD_RPATH=ON
# 替代方案:使用RUNPATH(更安全)
DEB_CMAKE_EXTRA_FLAGS += -DCMAKE_SKIP_RPATH=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON

@wjyrich wjyrich changed the title fix: reduce app item border width and fix test RPATH fix: 删掉重复编译处理方式——处理打包单元测试报错问题。 Nov 27, 2025
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, wjyrich

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

@wjyrich
Copy link
Contributor Author

wjyrich commented Nov 27, 2025

/forcemerge

@deepin-bot
Copy link

deepin-bot bot commented Nov 27, 2025

This pr force merged! (status: behind)

@deepin-bot deepin-bot bot merged commit 774c00e into linuxdeepin:master Nov 27, 2025
9 of 11 checks passed
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