Skip to content

Fix import guards in NIOSSHServer and audit sendability #208

@glbrntt

Description

@glbrntt

The NIOSSHServer example guards all of its code with #if canImport(Foundation.Process) to avoid build failures on platforms without Process.

However, Swift doesn't have submodules like this, Objective-C does. As Foundation transitions to Swift this check now always fails, even if Process is available. The result of this is that example code doesn't compile with newer Swift versions. Removing the can-imports results in a handful of Sendability warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions