Release 1.11#1588
Conversation
1. Add driver upgrade and improves detection accuracy with remote repository integration. 2. Optimize unit tests.
1. Update POT creation timestamp to 2026-02-06 2. Refresh source file line number references throughout the template 3. Add new translatable string for progress output control option 4. Remove obsolete cache generation failure message 5. Synchronize with latest CLI and builder source code locations Log: Added CLI flag to suppress progress information output Influence: 1. Test that the new "Don't output progress information" string appears in help output 2. Verify that translation extraction process works correctly 3. Check that error messages with file references point to correct lines 4. Ensure no broken references to removed strings exist in code 5. Validate CLI behavior when progress output is disabled
Signed-off-by: reddevillg <reddevillg@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dengbo11 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Summary of ChangesHello @dengbo11, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a substantial refactoring and enhancement of the graphics driver detection and installation system, centralizing logic within a dedicated manager class and improving its interaction with the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Update CMakeLists version to 1.11.3.
deepin pr auto review代码审查报告总体评估此次代码变更主要涉及驱动检测模块的重构和版本更新,包括驱动检测逻辑的改进、命令行参数处理的优化以及国际化文本的更新。整体代码质量较好,但存在一些可以改进的地方。 详细审查1. apps/ll-cli/src/main.cpp 变更语法逻辑:
代码质量:
改进建议: std::vector<std::string> transformOldExec(int argc, char **argv) noexcept
{
std::vector<std::string> res;
for (int i = argc - 1; i > 0; --i) {
if (std::string_view(argv[i]) == "--exec") {
// 验证后面是否有参数
if (i + 1 >= argc) {
qWarning() << "Missing argument after --exec";
res.emplace_back("--exec"); // 保留原参数
continue;
}
res.emplace_back("--");
} else {
res.emplace_back(argv[i]);
}
}
return res;
}2. apps/ll-driver-detect/src/driver_detection_manager.cpp 变更语法逻辑:
代码性能:
改进建议: auto packageRef = fmt::format("{}/{}", info.packageName, info.packageVersion);3. apps/ll-driver-detect/src/nvidia_driver_detector.cpp 变更语法逻辑:
代码安全:
改进建议: bool NVIDIADriverDetector::compareVersions(std::string_view v1, std::string_view v2) const noexcept
{
auto ver1 = package::Version::parse(std::string(v1));
auto ver2 = package::Version::parse(std::string(v2));
if (!ver1 || !ver2) {
LogW("Failed to parse versions: {} , {}", v1, v2);
// 返回错误状态而不是简单的false
return false;
}
return *ver1 > *ver2; // 解引用比较
}4. 国际化文本更新代码质量:
改进建议:
安全性考虑
性能优化建议
总结此次代码变更整体质量良好,主要改进了驱动检测模块的结构和功能。建议在以下几个方面进行改进:
代码风格基本一致,符合项目规范,建议继续保持。 |
There was a problem hiding this comment.
Code Review
This pull request introduces a significant refactoring of the driver detection and installation logic, centralizing functionality within the DriverDetectionManager and simplifying data structures. The argument parsing in ll-cli has been made safer and more straightforward. While these are positive changes for maintainability and security, I've identified a few critical issues: a logic bug in version comparison that could lead to incorrect upgrade decisions, and incomplete mock implementations in tests that will likely break the build. Addressing these issues is crucial before merging.
| return false; | ||
| } | ||
|
|
||
| return v1 > v2; |
There was a problem hiding this comment.
There's a critical logic bug in the version comparison. The function parses the version strings into package::Version objects (ver1 and ver2) but then proceeds to compare the raw std::string_views (v1 > v2). This will result in lexicographical string comparison, which is incorrect for semantic versioning (e.g., "10.0.0" would be considered less than "9.0.0"). The comparison should be performed on the parsed Version objects.
| return v1 > v2; | |
| return *ver1 > *ver2; |
| @@ -16,18 +16,13 @@ using namespace linglong::driver::detect; | |||
| class FakeSuccessDetector : public DriverDetector | |||
There was a problem hiding this comment.
The FakeSuccessDetector class inherits from DriverDetector but does not implement all of its pure virtual functions. The functions checkPackageInstalled and checkPackageUpgradable are missing. This will cause a compilation error. Please add dummy implementations for these methods.
class FakeSuccessDetector : public DriverDetector
{
public:
FakeSuccessDetector(std::string identify, std::string name, std::string version)
: info_{ std::move(identify), std::move(name), std::move(version) }
{
}
linglong::utils::error::Result<GraphicsDriverInfo> detect() override { return info_; }
utils::error::Result<bool> checkPackageInstalled(const std::string &) override
{
return false;
}
utils::error::Result<bool> checkPackageUpgradable(const std::string &) override
{
return false;
}
std::string getDriverIdentify() const override { return info_.identify; }
private:
GraphicsDriverInfo info_;
};| #include "driver_detection_manager.h" | ||
| #include "driver_detector.h" | ||
| #include "linglong/utils/cmd.h" | ||
| #include "linglong/utils/global/initialize.h" |
0d09bde
into
OpenAtom-Linyaps:release/1.11
No description provided.