Skip to content

Fix RawHTML, Script after SwiftSoup removed DataNode(String, ...) initializer#207

Merged
jverkoey merged 3 commits into
ClutchEngineering:mainfrom
21-DOT-DEV:DATANODE-API-CHANGE
Jun 2, 2025
Merged

Fix RawHTML, Script after SwiftSoup removed DataNode(String, ...) initializer#207
jverkoey merged 3 commits into
ClutchEngineering:mainfrom
21-DOT-DEV:DATANODE-API-CHANGE

Conversation

@csjones

@csjones csjones commented May 31, 2025

Copy link
Copy Markdown
Contributor

What happened?

When a project depends on Slipstream, it currently fetches version 2.8.7+ of SwiftSoup. This dependency introduced a breaking change in PR scinfu/SwiftSoup#295 which deleted the convenience initializer:

DataNode(_ data: String, _ baseUri: String)

As a result, Slipstream fails to compile with:

Cannot convert value of type 'String' to expected argument type '[UInt8]'

Alternatives considered

  1. Use newer static API:
let child = try DataNode.createFromEncoded(source, container.getBaseUri())
try container.appendChild(child)
  1. Lock SwiftSoup to a version prior to 2.8 in the manifest file using exact:

@jverkoey jverkoey enabled auto-merge (squash) May 31, 2025 23:30
@jverkoey

Copy link
Copy Markdown
Collaborator

Thank you!

auto-merge was automatically disabled June 1, 2025 00:15

Head branch was pushed to by a user without write access

steps:
- name: Select Xcode
run: sudo xcode-select -s "/Applications/Xcode_16.app"
run: sudo xcode-select -s "/Applications/Xcode_16.2.app"

@csjones csjones Jun 1, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Xcode 16.0 is unavailable in macos-latest (which points to macos-14).

@csjones

csjones commented Jun 2, 2025

Copy link
Copy Markdown
Contributor Author

@jverkoey Just a heads up, I had to push another commit because CI failed, which automatically disabled the auto-merge.

@jverkoey jverkoey merged commit 4e06531 into ClutchEngineering:main Jun 2, 2025
2 checks passed
@jverkoey

jverkoey commented Jun 2, 2025

Copy link
Copy Markdown
Collaborator

Ah thank you! Merged. Much appreciated you tackling this fix!

@jverkoey

jverkoey commented Jun 2, 2025

Copy link
Copy Markdown
Collaborator

Where are you using Slipstream at btw? Happy to add a link to your sites :)

@csjones

csjones commented Jun 2, 2025

Copy link
Copy Markdown
Contributor Author

Where are you using Slipstream at btw? Happy to add a link to your sites :)

I’m just getting started with Slipstream, so no live content just yet. I'm focused on revamping my Tailwind site at P256K1.dev and replacing a placeholder at 21.dev. Once I get everything rolling, I’ll open-source it on GitHub. Appreciate the support and would love a link when things are ready! Thanks! 😊 🚀

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.

2 participants