Use FilePath for SnapshotStore#25
Open
chrisgeo wants to merge 2 commits into
Open
Conversation
This was referenced May 9, 2026
ae62382 to
9599d87
Compare
- Closes CHAOS-1454. - Internal cluster; URL boundary preserved at `directorySize` for `URLResourceKey.totalFileAllocatedSizeKey`. - Sibling of apple#1480 (HostDNSResolver) and apple#1518 (PacketFilter), same pattern.
Clarifies that the URL leak is required by the URLEnumerator API and has no FilePath equivalent (vs. the prior "is a Foundation API" wording, which underspecified the constraint).
9599d87 to
8b2c540
Compare
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.
Summary
SnapshotStorefromURLtoSystemPackage.FilePathacross ~14 path references.init(path: URL, …)→init(path: FilePath, …). Single construction site updated atSources/Plugins/CoreImages/ImagesHelper.swift:98viaSnapshotStore(path: FilePath(root.absolutePath()), …).ImagesServiceandImagesServiceHarnessreceive a pre-constructedSnapshotStoreand need no changes.directorySizeforURLResourceKey.totalFileAllocatedSizeKey— there is noFilePathequivalent for this Foundation enumerator API. Comment justifies the leak; allocated-size semantics and iteration order are unchanged.Closes CHAOS-1454. Sibling of apple#1480 (HostDNSResolver) and apple#1518 (PacketFilter), same migration pattern.
Test plan
swift buildsucceeds (3107/3107 artifacts, no warnings).swift test --filter ContainerImagesService— no failures (no dedicated unit tests target this module today).container image rm <id>triggersSnapshotStore.clean()correctly.SnapshotStoreis anactorwith non-serialized stored properties;FilesystemJSON encoding (line 114) untouched.