Skip to content

Restore missing build fixes and imports from commit 2d24aeb - #2

Merged
mo74m3ed merged 1 commit into
mainfrom
copilot/container-commit-references
Sep 8, 2026
Merged

Restore missing build fixes and imports from commit 2d24aeb#2
mo74m3ed merged 1 commit into
mainfrom
copilot/container-commit-references

Conversation

Copilot AI commented Sep 8, 2026

Copy link
Copy Markdown

Important

All commits must be signed and verified. Pull requests containing unsigned or unverified commits cannot be built or merged. See the GitHub documentation for instructions.

For all but trivial fixes, make sure to first create a GitHub issue that concisely describes the bug or desired enhancement as justification for the change. Large PRs with no justifying issue will be closed.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

Several critical build fixes and dependency imports introduced in commit 2d24aeb491fad6ceea7f2736a252eae73b427ab7 were inadvertently reverted during a subsequent branch merge (25aee91). This PR restores those changes to keep compilation clean and prevent warnings-as-errors failures.

Suppressed Discardable Task Warning

In Sources/ContainerBuild/Builder.swift:

  • Replaced Task { with _ = Task { to silence unused task result warnings under -warnings-as-errors.
if let terminal = config.terminal {
    _ = Task {
        let winchHandler = AsyncSignalHandler.create(notify: [SIGWINCH])

Restored Missing SystemPackage Imports

  • Sources/Plugins/NetworkVmnet/NetworkVmnetHelper+Start.swift: Restored import SystemPackage.
  • Sources/Plugins/RuntimeLinux/RuntimeLinuxHelper+Start.swift: Restored import SystemPackage.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

Greptile Summary

This PR restores warning-clean Swift build behavior and imports needed by two plugin startup implementations.

  • Explicitly discards the terminal resize task handle to silence an unused-result warning.
  • Restores SystemPackage imports for the NetworkVmnet and RuntimeLinux helpers.
  • The importing targets still rely on transitive availability of SystemPackage rather than direct package dependencies.

Confidence Score: 4/5

The PR appears safe to merge under the current build configuration, though both new imports should be backed by direct target dependencies for strict SwiftPM builds.

The restored imports resolve through existing transitive dependencies today, but explicit target dependency checking rejects them because neither importing target declares SystemPackage directly.

Files Needing Attention: Sources/Plugins/NetworkVmnet/NetworkVmnetHelper+Start.swift, Sources/Plugins/RuntimeLinux/RuntimeLinuxHelper+Start.swift, Package.swift

Important Files Changed

Filename Overview
Sources/ContainerBuild/Builder.swift Explicitly discards an already-unretained task handle without changing task execution or lifecycle behavior.
Sources/Plugins/NetworkVmnet/NetworkVmnetHelper+Start.swift Restores a required SystemPackage import, but the target does not directly declare that package product.
Sources/Plugins/RuntimeLinux/RuntimeLinuxHelper+Start.swift Restores SystemPackage access for System and POSIXError usage, while relying on a transitive target dependency.
Prompt To Fix All With AI
### Issue 1
Sources/Plugins/NetworkVmnet/NetworkVmnetHelper+Start.swift:29
**Imports rely on transitive dependency**

The new `SystemPackage` imports in both plugin targets rely on transitive dependencies instead of direct target declarations. Builds that enable SwiftPM explicit target dependency checking reject these imports, so declare the product directly for `container-network-vmnet` and `container-runtime-linux`.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "Restore missing changes from commit 2d24..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Co-authored-by: mo74m3ed <71875716+mo74m3ed@users.noreply.github.com>
@mo74m3ed
mo74m3ed marked this pull request as ready for review September 8, 2026 03:53
Copilot AI lite review requested due to automatic review settings September 8, 2026 03:53
@mo74m3ed
mo74m3ed merged commit db2c726 into main Sep 8, 2026
6 checks passed

@mo74m3ed mo74m3ed left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@mo74m3ed mo74m3ed left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@mo74m3ed
mo74m3ed deleted the copilot/container-commit-references branch September 8, 2026 03:55
import ContainerizationExtras
import Foundation
import Logging
import SystemPackage

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Imports rely on transitive dependency

The new SystemPackage imports in both plugin targets rely on transitive dependencies instead of direct target declarations. Builds that enable SwiftPM explicit target dependency checking reject these imports, so declare the product directly for container-network-vmnet and container-runtime-linux.

Prompt To Fix With AI
This is a comment left during a code review.
Path: Sources/Plugins/NetworkVmnet/NetworkVmnetHelper+Start.swift
Line: 29

Comment:
**Imports rely on transitive dependency**

The new `SystemPackage` imports in both plugin targets rely on transitive dependencies instead of direct target declarations. Builds that enable SwiftPM explicit target dependency checking reject these imports, so declare the product directly for `container-network-vmnet` and `container-runtime-linux`.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes are small, align with the stated build-fix intent, and should restore clean compilation under warnings-as-errors.

Pull request overview

Restores build-related fixes that were previously reverted, aiming to keep the Swift packages compiling cleanly under warnings-as-errors by reintroducing missing imports and silencing an unused Task result warning.

Changes:

  • Re-adds import SystemPackage to two plugin helper start commands.
  • Changes Task { ... } to _ = Task { ... } in Builder.build(_:) to suppress the unused-task-result warning.
File summaries
File Description
Sources/Plugins/RuntimeLinux/RuntimeLinuxHelper+Start.swift Restores SystemPackage import needed for build-related types used by the helper.
Sources/Plugins/NetworkVmnet/NetworkVmnetHelper+Start.swift Restores SystemPackage import needed for build-related types used by the helper.
Sources/ContainerBuild/Builder.swift Silences unused Task result warning when starting the SIGWINCH listener task.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 110 to +111
if let terminal = config.terminal {
Task {
_ = Task {
@mo74m3ed

mo74m3ed commented Sep 8, 2026

Copy link
Copy Markdown
Owner

@copilot Fix the code for all comments in this review thread.

When a review comment includes a suggested change, apply the suggestion exactly.

Do not make changes beyond what is described in the linked review thread.

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