Update SwiftSoup from 2.7.5 to 2.13.6#25811
Merged
Merged
Conversation
Removes the `'swiftsoup': found 4 file(s) which are unhandled` warning emitted during `swift test`. Upstream dropped the four stray `Info*.plist` files from the package's `Sources/` directory in 2.8.2, so any release past our pin resolves it — this takes us to the latest, 2.13.6. No breaking API changes across 2.8–2.13.6 (Swift 5.9+ floor, satisfied). Our usage — `parse`, `parseBodyFragment`, `clean`, `Element`/`Elements`/`Comment`/ `Entities` — is unchanged.
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 33334 | |
| Version | PR #25811 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 3bd8aa3 | |
| Installation URL | 7rk3gprmom848 |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 33334 | |
| Version | PR #25811 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 3bd8aa3 | |
| Installation URL | 4tscma59dc44g |
Contributor
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
crazytonyli
approved these changes
Jul 22, 2026
`SwiftSoup` 2.12+ serializes unchanged nodes from a cached slice of the original source, so the `attr()` mutations the media upload processors make on nested elements weren't reflected in the output — only the mutated node is marked dirty, not its ancestors, so `body.html()` re-emitted stale bytes and uploaded media kept their local `file://` URLs and temp IDs. `GutenbergContentParser.html()` now replaces each top-level element with a copy to force a fresh render of the mutated subtrees, while emitting the surrounding comment/text nodes (Gutenberg block delimiters) from their original bytes. Output is byte-for-byte identical to the previous behavior. All Gutenberg upload processor tests pass on 2.13.6.
Extends the existing suite with the coverage the SwiftSoup 2.13.6 fix relies on but that was missing. The prior element-mutation test only mutates a top-level node, whose change survives serialization even with the 2.12+ regression; the new tests mutate nested and deeply-nested elements, which are the paths that actually broke. Also pins the serialization contract that shifts across SwiftSoup versions — void-element normalization, entity / raw-text / preformatted / unicode fidelity, `html()` idempotence — and the malformed-JSON and sorted-key attribute handling.
Moves the SwiftSoup-based Gutenberg code — `GutenbergContentParser`, the `GutenbergProcessor` protocol, and the image/gallery/file upload processors — out of the app target into a new `GutenbergProcessors` module so its tests run under `swift test` on macOS instead of a full iOS app build. The Aztec-based processors stay in the app; they depend on UIKit and can't run cross-platform. Wiring is entirely in Package.swift, no project changes: the module is added to `keystoneDependencies` (how the app links it), a cross-platform test target is added to the root package, and the target is registered in the unit-test plan. `PostCoordinator` is the only consumer. Runs via `swift test --filter GutenbergProcessorsTests`.
Collaborator
Generated by 🚫 Danger |
This was referenced Jul 22, 2026
jkmassel
added a commit
that referenced
this pull request
Jul 23, 2026
Relocate the String.hash guard test from KeystoneTests to WordPressSharedTests so it runs under `swift test` at the repo root. #25811 moved the other Gutenberg tests into GutenbergProcessorsTests but left this one behind — it asserts a Swift String hash value and has no processor dependency. Drops the vestigial `@testable import WordPress`.
jkmassel
added a commit
that referenced
this pull request
Jul 23, 2026
Relocate the String.hash guard test from KeystoneTests to WordPressSharedTests so it runs under `swift test` at the repo root. #25811 moved the other Gutenberg tests into GutenbergProcessorsTests but left this one behind — it asserts a Swift String hash value and has no processor dependency. Drops the vestigial `@testable import WordPress`.
jkmassel
added a commit
that referenced
this pull request
Jul 23, 2026
Relocate the String.hash guard test from KeystoneTests to WordPressSharedTests so it runs under `swift test` at the repo root. #25811 moved the other Gutenberg tests into GutenbergProcessorsTests but left this one behind — it asserts a Swift String hash value and has no processor dependency. Drops the vestigial `@testable import WordPress`.
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.


Description
Bumps
SwiftSoupfrom2.7.5to2.13.6(latest).This silences the one warning our cross-platform
swift testjob still emits:The warning comes from SwiftSoup's own manifest — at
2.7.5itsSources/directory carries four strayInfo*.plistfiles that the package neither declares as resources nor excludes. Upstream removed them in2.8.2, so any release past our pin clears it; this takes us to the latest.2.8–2.13.6. The only floor change is Swift5.9+(we're on Swift 6). Every call site we have —parse,parseBodyFragment,clean, andElement/Elements/Comment/Entities— is unchanged.2.13added XML auto-detection toparse(), and2.12adjusted theclean()sanitizer (CSS-property whitelisting, URL-whitespace handling).Modules/Package.swiftplus the two committedPackage.resolvedfiles. No other dependency moved.This is deliberately split from the separate
swift testwarning cleanup (the remaining first-party warnings) so the shared HTML-parsing bump gets its own review and test pass.Testing instructions
swift test(cross-platform package) — 128 tests pass and theswiftsoupunhandled-files warning is gone. This recompilesWordPressSharedand runs the Gutenberg excerpt-generator suite against2.13.6.2.13.6:ReaderPostParserTests— Reader post parsing (parse,clean,select)ContentExtractorTests—WordPressIntelligencecontent extractionGutenbergGalleryUploadProcessorTests— block-editor gallery upload (parseBodyFragment)ReaderPostTests/ReaderPostMappingTestsRelated
SwiftSoupto address privacy manifest warning #23551 (2.7.1→2.7.5)