-
Notifications
You must be signed in to change notification settings - Fork 16
fix: remove WAYLAND_DEBUG environment variable in release builds #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Removed the conditional WAYLAND_DEBUG environment variable setting that was only enabled in debug builds. This change eliminates unnecessary debug output in production environments and ensures cleaner system logs. The debug flag was previously set for both TreeLand compositor and single Wayland helper processes when compiled in debug mode. Influence: 1. Verify Wayland compositor starts normally without debug output 2. Check system logs for reduced debug message clutter 3. Test TreeLand compositor functionality remains unchanged 4. Validate single Wayland helper process operation 5. Confirm no regression in display server initialization fix: 在发布版本中移除 WAYLAND_DEBUG 环境变量设置 移除了仅在调试版本中启用的 WAYLAND_DEBUG 环境变量条件设置。此更改消除了 生产环境中不必要的调试输出,确保系统日志更清晰。之前该调试标志在调试模式 下同时为 TreeLand 合成器和单 Wayland 助手进程设置。 Influence: 1. 验证 Wayland 合成器正常启动且无调试输出 2. 检查系统日志中调试消息杂乱度是否降低 3. 测试 TreeLand 合成器功能保持不变 4. 验证单 Wayland 助手进程运行正常 5. 确认显示服务器初始化无回归问题
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoves all conditional WAYLAND_DEBUG environment variable settings so that even debug builds no longer force Wayland protocol debug logging, while keeping the rest of the compositor and helper process startup environment unchanged. Sequence diagram for Wayland compositor startup without WAYLAND_DEBUGsequenceDiagram
participant Daemon_Display as Daemon_Display
participant QProcessEnvironment as QProcessEnvironment
participant TreeLand_Compositor as TreeLand_Compositor
participant SingleWaylandHelper as SingleWaylandHelper
Daemon_Display->>QProcessEnvironment: systemEnvironment()
QProcessEnvironment-->>Daemon_Display: base_env
Daemon_Display->>QProcessEnvironment: insert DDE_CURRENT_COMPOSITOR=TreeLand (for SingleCompositerServerType)
Note over Daemon_Display,QProcessEnvironment: WAYLAND_DEBUG is no longer inserted in any build
Daemon_Display->>TreeLand_Compositor: start with env
TreeLand_Compositor->>SingleWaylandHelper: spawn helper process
SingleWaylandHelper->>QProcessEnvironment: systemEnvironment()
QProcessEnvironment-->>SingleWaylandHelper: base_env
SingleWaylandHelper->>QProcessEnvironment: insert LIBSEAT_BACKEND=seatd
SingleWaylandHelper->>QProcessEnvironment: insert DSG_APP_ID=org.deepin.dde.treeland
Note over SingleWaylandHelper,QProcessEnvironment: WAYLAND_DEBUG is no longer conditionally inserted
SingleWaylandHelper->>TreeLand_Compositor: run with env
TreeLand_Compositor-->>Daemon_Display: compositor running without protocol debug logging
Flow diagram for environment setup without WAYLAND_DEBUGflowchart TD
A[Start display server setup] --> B[Check display server type]
B -->|SingleCompositerServerType| C[Create env from systemEnvironment]
B -->|Other types| D[Configure Xorg or other server]
C --> E[Insert DDE_CURRENT_COMPOSITOR=TreeLand]
E --> F[Start TreeLand compositor with env]
F --> G[SingleWaylandHelper builds env]
G --> H[Create env from systemEnvironment]
H --> I[Insert LIBSEAT_BACKEND=seatd]
I --> J[Insert DSG_APP_ID=org.deepin.dde.treeland]
J --> K[Start single Wayland helper process]
D --> L[Start selected display server]
K --> M[Display server running]
L --> M
subgraph Removed_behavior
R1[Previously: if debug build
insert WAYLAND_DEBUG=1 in Daemon_Display]
R2[Previously: if debug build
insert WAYLAND_DEBUG=1 in SingleWaylandHelper]
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review我来对这段代码的修改进行审查:
语法逻辑:
代码质量:
代码性能:
代码安全:
// 在 Display.cpp 中
if (m_displayServerType == DisplayServerType::SingleCompositerServerType) {
// 注意:生产环境不应启用 WAYLAND_DEBUG
// 如需调试,请通过其他方式(如配置文件)启用
env.insert("DDE_CURRENT_COMPOSITOR", "TreeLand");
}
// 在 singlewaylandhelper.cpp 中
auto env = QProcessEnvironment::systemEnvironment();
env.insert("LIBSEAT_BACKEND", "seatd");
env.insert("DSG_APP_ID", "org.deepin.dde.treeland");
// 注意:生产环境不应启用 WAYLAND_DEBUG
// 如需调试,请通过其他方式(如配置文件)启用
return env;
总的来说,这个修改是合理的,移除了生产环境中不必要的调试代码。建议添加适当的注释说明,并考虑提供其他方式来启用调试模式。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wineee, zccrs 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 |
Removed the conditional WAYLAND_DEBUG environment variable setting that was only enabled in debug builds. This change eliminates unnecessary debug output in production environments and ensures cleaner system logs. The debug flag was previously set for both TreeLand compositor and single Wayland helper processes when compiled in debug mode.
Influence:
fix: 在发布版本中移除 WAYLAND_DEBUG 环境变量设置
移除了仅在调试版本中启用的 WAYLAND_DEBUG 环境变量条件设置。此更改消除了
生产环境中不必要的调试输出,确保系统日志更清晰。之前该调试标志在调试模式
下同时为 TreeLand 合成器和单 Wayland 助手进程设置。
Influence:
Summary by Sourcery
Bug Fixes: