Skip to content

Fix import guards in NIOSSHServer #210

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

Closed
wants to merge 4 commits into from
Closed

Conversation

rafaelcepeda
Copy link
Contributor

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.

I've removed the guards and fixed all of the resulting Sendability warnings.

@rafaelcepeda rafaelcepeda added the 🔨 semver/patch No public API change. label Jun 18, 2025
@rafaelcepeda
Copy link
Contributor Author

Closed this PR, as these changes have been incorporated in another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant