{{ message }}
Use SystemPath for HostDNSResolver.#1480
Merged
Merged
Conversation
- Closes apple#1479. - Using URL for filesystem paths is bad practice. FilePath is safer and more ergonomic.
JaewonHur
approved these changes
Apr 30, 2026
Contributor
There was a problem hiding this comment.
nit. we don't need attributes: nil?
Contributor
Author
There was a problem hiding this comment.
You're right, updated.
jglogan
commented
Apr 30, 2026
14 tasks
JaewonHur
approved these changes
Apr 30, 2026
noah-thor
pushed a commit
to noah-thor/container
that referenced
this pull request
May 6, 2026
- Closes apple#1479. - Using URL for filesystem paths is bad practice. FilePath is safer and more ergonomic.
chrisgeo
added a commit
to full-chaos/container
that referenced
this pull request
May 7, 2026
Replaces URL-based filesystem operations with SystemPackage.FilePath, mirroring the pattern landed in apple#1480 for HostDNSResolver: - configURL/anchorsURL → configPath/anchorsPath: FilePath - defaultConfigPath/defaultAnchorsPath now FilePath - FileManager calls switch from atPath: url.path to atPath: path.string - Tests use String(contentsOfFile:) in place of String(contentsOf: URL) Process.executableURL stays URL since Foundation.Process requires it.
This was referenced May 7, 2026
jglogan
pushed a commit
that referenced
this pull request
May 8, 2026
This was referenced May 8, 2026
chrisgeo
added a commit
to full-chaos/container
that referenced
this pull request
May 8, 2026
Replaces URL-based path normalization with SystemPackage.FilePath in the three Filesystem factory methods (block, volume, virtiofs): - source: URL(fileURLWithPath: source).absolutePath() → FilePath(source).string All existing callers (Parser, Utility, SnapshotStore, RuntimeConfigurationTests) already pass absolute paths; the URL round-trip was a no-op in practice. FilePath preserves separator normalization equivalent to the URL form. Following the migration pattern from apple#1480 (HostDNSResolver), apple#1518 (PacketFilter), and discussion apple#1481.
chrisgeo
added a commit
to full-chaos/container
that referenced
this pull request
May 8, 2026
Replaces URL-based filesystem path handling with SystemPackage.FilePath, following the pattern from apple#1480 (HostDNSResolver) and apple#1518 (PacketFilter): - directoryURL → directoryPath: FilePath (public API) - startWatching handler signature changes from ([URL]) to ([FilePath]) - LocalhostDNSHandler caller updated; the URL(filePath: configPath.string) wrapping shim is no longer needed - FilePath.lastComponent (returns Optional<Component>) handled in LocalhostDNSHandler's filename filter
This was referenced May 8, 2026
jglogan
pushed a commit
that referenced
this pull request
May 11, 2026
jglogan
pushed a commit
that referenced
this pull request
May 12, 2026
chrisgeo
added a commit
to full-chaos/container
that referenced
this pull request
May 13, 2026
Converts RuntimeConfiguration.path, runtimeConfigurationPath, and the readRuntimeConfiguration(from:) parameter from URL to FilePath. Following the migration pattern from apple#1480 (HostDNSResolver), apple#1518 (PacketFilter), and discussion apple#1481. The two server-side callers (ContainersService, SandboxService) get minimal URL <-> FilePath bridge calls. Bundle.create still requires URL (Foundation API) so the bridge stays at that boundary. Bundle+Log.swift in the same module is intentionally NOT converted in this PR: all three of its callers use Foundation FileHandle APIs that require URL, and converting bundle.containerLog without simultaneously updating those callers (in ContainersService and SandboxService) would expand the PR scope significantly. Bundle+Log can be converted later as part of a SandboxService/ContainersService cluster conversion.
chrisgeo
added a commit
to full-chaos/container
that referenced
this pull request
May 13, 2026
Convert PluginConfig.init from URL to FilePath, following the migration pattern from apple#1480 (HostDNSResolver), apple#1518 (PacketFilter), and discussion apple#1481. - PluginConfig.init?(configURL: URL) → init?(configPath: FilePath) - DefaultPluginFactory.findConfigURL → findConfigPath (returns FilePath?) - Both internal call sites (DefaultPluginFactory, AppBundlePluginFactory) updated; bridge from URL to FilePath stays at the directory boundary since broader PluginFactory conversion is tracked separately. - Tests updated to derive FilePath from temp URL.
chrisgeo
added a commit
to full-chaos/container
that referenced
this pull request
May 13, 2026
- Closes CHAOS-1454. - Internal cluster; URL boundary preserved at `directorySize` for `URLResourceKey.totalFileAllocatedSizeKey`. - Sibling of apple#1480 (HostDNSResolver) and apple#1518 (PacketFilter), same pattern.
chrisgeo
added a commit
to full-chaos/container
that referenced
this pull request
May 13, 2026
Converts RuntimeConfiguration.path, runtimeConfigurationPath, and the readRuntimeConfiguration(from:) parameter from URL to FilePath. Following the migration pattern from apple#1480 (HostDNSResolver), apple#1518 (PacketFilter), and discussion apple#1481. The two server-side callers (ContainersService, SandboxService) get minimal URL <-> FilePath bridge calls. Bundle.create still requires URL (Foundation API) so the bridge stays at that boundary. Bundle+Log.swift in the same module is intentionally NOT converted in this PR: all three of its callers use Foundation FileHandle APIs that require URL, and converting bundle.containerLog without simultaneously updating those callers (in ContainersService and SandboxService) would expand the PR scope significantly. Bundle+Log can be converted later as part of a SandboxService/ContainersService cluster conversion.
chrisgeo
added a commit
to full-chaos/container
that referenced
this pull request
May 13, 2026
Convert PluginConfig.init from URL to FilePath, following the migration pattern from apple#1480 (HostDNSResolver), apple#1518 (PacketFilter), and discussion apple#1481. - PluginConfig.init?(configURL: URL) → init?(configPath: FilePath) - DefaultPluginFactory.findConfigURL → findConfigPath (returns FilePath?) - Both internal call sites (DefaultPluginFactory, AppBundlePluginFactory) updated; bridge from URL to FilePath stays at the directory boundary since broader PluginFactory conversion is tracked separately. - Tests updated to derive FilePath from temp URL.
chrisgeo
added a commit
to full-chaos/container
that referenced
this pull request
May 14, 2026
- Closes CHAOS-1454. - Internal cluster; URL boundary preserved at `directorySize` for `URLResourceKey.totalFileAllocatedSizeKey`. - Sibling of apple#1480 (HostDNSResolver) and apple#1518 (PacketFilter), same pattern.
This was referenced May 23, 2026
chrisgeo
added a commit
to full-chaos/container
that referenced
this pull request
May 24, 2026
Convert PluginConfig.init from URL to FilePath, following the migration pattern from apple#1480 (HostDNSResolver), apple#1518 (PacketFilter), and discussion apple#1481. - PluginConfig.init?(configURL: URL) → init?(configPath: FilePath) - DefaultPluginFactory.findConfigURL → findConfigPath (returns FilePath?) - Both internal call sites (DefaultPluginFactory, AppBundlePluginFactory) updated; bridge from URL to FilePath stays at the directory boundary since broader PluginFactory conversion is tracked separately. - Tests updated to derive FilePath from temp URL.
chrisgeo
added a commit
to full-chaos/container
that referenced
this pull request
May 24, 2026
- Closes CHAOS-1454. - Internal cluster; URL boundary preserved at `directorySize` for `URLResourceKey.totalFileAllocatedSizeKey`. - Sibling of apple#1480 (HostDNSResolver) and apple#1518 (PacketFilter), same pattern.
chrisgeo
added a commit
to full-chaos/container
that referenced
this pull request
May 24, 2026
- Closes CHAOS-1457. - Adds shared FilePath.absolute(_:relativeTo:) helper. - Sibling of apple#1480 (HostDNSResolver) and apple#1518 (PacketFilter), same pattern.
chrisgeo
added a commit
to full-chaos/container
that referenced
this pull request
May 24, 2026
Converts RuntimeConfiguration.path, runtimeConfigurationPath, and the readRuntimeConfiguration(from:) parameter from URL to FilePath. Following the migration pattern from apple#1480 (HostDNSResolver), apple#1518 (PacketFilter), and discussion apple#1481. The two server-side callers (ContainersService, SandboxService) get minimal URL <-> FilePath bridge calls. Bundle.create still requires URL (Foundation API) so the bridge stays at that boundary. Bundle+Log.swift in the same module is intentionally NOT converted in this PR: all three of its callers use Foundation FileHandle APIs that require URL, and converting bundle.containerLog without simultaneously updating those callers (in ContainersService and SandboxService) would expand the PR scope significantly. Bundle+Log can be converted later as part of a SandboxService/ContainersService cluster conversion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Type of Change
Motivation and Context
See above
Testing