Skip to content

feat: remove SwiftNIO backend from FileSystem#333

Open
pepicrft wants to merge 1 commit intomainfrom
codex/remove-swiftnio-and-env-override
Open

feat: remove SwiftNIO backend from FileSystem#333
pepicrft wants to merge 1 commit intomainfrom
codex/remove-swiftnio-and-env-override

Conversation

@pepicrft
Copy link
Copy Markdown
Contributor

Summary

  • Remove the SwiftNIO dependency from the package manifest and resolve the lockfile without it.
  • Collapse FileSystem onto the new default implementation on non-Windows platforms and delete the env-based backend switch.
  • Replace the backend-toggle test with coverage for the default file system behavior.

Testing

  • swift test

@pepicrft pepicrft changed the title Remove SwiftNIO backend from FileSystem feat: Remove SwiftNIO backend from FileSystem Apr 25, 2026
@pepicrft pepicrft self-assigned this Apr 25, 2026
@pepicrft pepicrft requested review from a team and fortmarek and removed request for a team April 25, 2026 11:30
@pepicrft pepicrft marked this pull request as ready for review April 25, 2026 11:30
@pepicrft pepicrft changed the title feat: Remove SwiftNIO backend from FileSystem feat: remove SwiftNIO backend from FileSystem Apr 25, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c99f7369c0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +818 to +822
try File.System.Move.move(
from: try swiftFileSystemPath(path),
to: try swiftFileSystemPath(to),
options: .init(overwrite: true)
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Handle replacing non-empty directories

replace(_:with:) now routes through File.System.Move.move(..., options: .init(overwrite: true)). In the vendored POSIX move path, overwrite still relies on rename and does not remove an existing destination directory first, so replacing into a non-empty directory fails with ENOTEMPTY/EEXIST instead of actually replacing it. This breaks callers that use replace to refresh directory trees and also diverges from the Windows branch, which removes the destination before copying.

Useful? React with 👍 / 👎.

Comment on lines +608 to +611
try File.System.Move.move(
from: try swiftFileSystemPath(from),
to: try swiftFileSystemPath(to)
)
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 Badge Support cross-device directory moves

move(from:to:options:) now always uses File.System.Move.move on non-Windows. That move implementation only falls back on EXDEV via a copy+delete path that calls File.System.Copy._copyPOSIX, which explicitly rejects directories, so directory moves across filesystems fail instead of succeeding. This can break normal workflows when source and destination are on different mounts (for example temp dirs vs workspace volumes).

Useful? React with 👍 / 👎.

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.

1 participant