Skip to content

Conversation

@felixonmars
Copy link
Member

@felixonmars felixonmars commented Nov 30, 2025

Fixes relevant compile failures on Arch.

Summary by Sourcery

Bug Fixes:

  • Correct the relative include path for the shared settings header in basic and scientific keypad controls to resolve build failures on some environments.

Fixes relevant compile failures on Arch.
@sourcery-ai
Copy link

sourcery-ai bot commented Nov 30, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts include paths for the keypad control sources so that the 3rd-party settings header is resolved correctly in the current directory layout, fixing compilation on Arch.

File-Level Changes

Change Details Files
Fix incorrect relative include path to the 3rd-party settings header used by keypad controls.
  • Update the relative path to the core settings header in the basic keypad implementation from one directory up to two directories up.
  • Update the relative path to the core settings header in the scientific keypad implementation from one directory up to two directories up.
src/control/basickeypad.cpp
src/control/scientifickeypad.cpp

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:

  • Instead of relying on deeper relative include paths like ../../3rdparty/core/settings.h, consider configuring include directories in your build system and using a project-root-relative or namespaced include path to make the codebase more robust to future file moves.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Instead of relying on deeper relative include paths like `../../3rdparty/core/settings.h`, consider configuring include directories in your build system and using a project-root-relative or namespaced include path to make the codebase more robust to future file moves.

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.

@deepin-ci-robot
Copy link

deepin pr auto review

我来对这段代码差异进行审查:

  1. 语法逻辑:
  • 这只是一个头文件包含路径的修改,从 ../3rdparty/core/settings.h 改为 ../../3rdparty/core/settings.h
  • 语法上没有任何问题,这是一个合法的包含路径修改
  1. 代码质量:
  • 这个修改看起来是为了修正包含路径。如果原始路径无法正确找到头文件,那么这个修改是必要的
  • 建议检查项目结构,确保新的相对路径 ../../3rdparty/core/settings.h 能够正确定位到目标文件
  • 考虑使用项目的构建系统(如CMake)来管理包含路径,而不是使用相对路径,这样更不容易出错
  1. 代码性能:
  • 包含路径的修改对运行时性能没有影响,只影响编译时的头文件查找
  • 从性能角度来说,这个修改不会产生任何负面影响
  1. 代码安全:
  • 这个修改不涉及安全性问题
  • 但是建议确保 settings.h 文件的安全性,因为它可能包含重要的配置信息

改进建议:

  1. 考虑在项目构建系统中添加包含目录,而不是使用相对路径:

    target_include_directories(your_target PRIVATE ${CMAKE_SOURCE_DIR}/3rdparty/core)

    然后在源代码中直接使用:

    #include "settings.h"
  2. 如果必须使用相对路径,建议添加注释说明目录结构,方便其他开发者理解:

    // From src/control/ to 3rdparty/core/
    #include "../../3rdparty/core/settings.h"
  3. 建议统一项目中所有文件对 settings.h 的包含方式,确保一致性

总的来说,这个修改本身是合理的,主要是为了修正头文件包含路径。但从项目维护的角度来看,建议采用更系统化的方式来管理包含路径。

@lzwind lzwind merged commit 0e6e821 into linuxdeepin:master Dec 1, 2025
18 checks passed
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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