Skip to content

[LXC] Build fix for Linux#305

Merged
huzaifa-d merged 6 commits into
mainfrom
feat/LXC-InstallBug
May 14, 2026
Merged

[LXC] Build fix for Linux#305
huzaifa-d merged 6 commits into
mainfrom
feat/LXC-InstallBug

Conversation

@huzaifa-d

@huzaifa-d huzaifa-d commented May 13, 2026

Copy link
Copy Markdown
Contributor

📖 Description

build.sh always failed at the lint step on Linux because cargo clippy --workspace --all-targets compiled every crate in the workspace — including Windows-only ones whose dependencies don't exist on Linux.

This PR scopes clippy to the three crates that build.sh actually targets: lxc, lxc_common, and wxc_common.
It also fixes a pre-existing clippy warning in logger.rs where an early return inside a #[cfg(windows)] block produced an unreachable-code warning when linted on Linux.

📋 Issue Type

  • Bug fix
  • Feature
  • Task
Microsoft Reviewers: Open in CodeFlow

@huzaifa-d
huzaifa-d requested a review from a team May 13, 2026 19:46
Copilot AI review requested due to automatic review settings May 14, 2026 21:56
@huzaifa-d
huzaifa-d marked this pull request as ready for review May 14, 2026 21:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Fixes Linux build failures in the build.sh lint step by avoiding clippy over the full workspace (which includes Windows-only crates), and addresses a clippy warning in the Windows-specific logger path.

Changes:

  • Scope cargo clippy in build.sh to lxc, lxc_common, and wxc_common instead of --workspace.
  • Add documentation in build.sh explaining why workspace-wide clippy fails on Linux.
  • Refactor diag_accumulate to avoid an early-return pattern that triggered clippy warnings in conditional compilation scenarios.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/wxc_common/src/logger.rs Adjusts Windows-only diagnostic accumulation logic to avoid clippy warnings.
build.sh Limits clippy to Linux-compatible crates and documents the rationale.

Comment thread build.sh Outdated
Comment thread build.sh Outdated
Comment on lines 262 to +263
#[cfg(target_os = "windows")]
{
if self.diag_pipe.is_none() {
return;
}
if self.diag_pipe.is_some() {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Following project convention

@huzaifa-d
huzaifa-d merged commit 79acaad into main May 14, 2026
15 checks passed
@huzaifa-d
huzaifa-d deleted the feat/LXC-InstallBug branch May 14, 2026 23:14
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.

4 participants