Skip to content

[RFC] Partially update selectors - #250

Closed
fhanau wants to merge 1 commit into
cloudflare:masterfrom
fhanau:felix/selectors-update-partial
Closed

fhanau wants to merge 1 commit into
cloudflare:masterfrom
fhanau:felix/selectors-update-partial

Conversation

@fhanau

@fhanau fhanau commented Dec 5, 2024

Copy link
Copy Markdown
Contributor

I'm delighted that we bumped the cssparser and selectors versions in #248 after they had been stuck for a while.
For workerd, updating these packages further is desirable as it would allow us to get rid of some old crates – notably phf 0.8, which is now 5 years old and pulls in more outdated packages. I tried to update to selectors 0.25/cssparser 0.31, with some success – I was able to get the build to work but am not sure how to fix the test cases after some selectors types were added/removed (see felix/selectors-update).

To make at least some progress here, we could update to a specific commit instead. This would be sufficient to move phf forward but require fewer lol-html changes. At the same time, a given commit might be less stable than a tagged release version. Let me know what you think about updating this further – if this approach feels sensible, or if moving directly to selectors 0.25 is feasible. I hope this doesn't duplicates any work you have already been doing.

Relevant selectors commits:
to_unconditional: servo/stylo@8c33b56
ExtraMatchingData: servo/stylo@767bc8b
Has: servo/stylo@789476f

This finally resolves the dependency on phf 0.8.

- Port to_unconditional from selectors – this is no longer implemented for
  ParsedCaseSensitivity.
- Add PhantomData to ExtraMatchingData which now requires a lifetime.
- Add unsupported Has(_) type
@kornelski

Copy link
Copy Markdown
Contributor

Unfortunately git dependencies can't be published to crates.io, so we will have to do a full upgrade.

I've also started the upgrade: https://github.com/cloudflare/lol-html/compare/selectors%2Dupgrade

@paolobarbolini

Copy link
Copy Markdown
Contributor

Unfortunately git dependencies can't be published to crates.io, so we will have to do a full upgrade.

I've also started the upgrade: https://github.com/cloudflare/lol-html/compare/selectors%2Dupgrade

I've opened #264 on top of your branch

@fhanau
fhanau deleted the felix/selectors-update-partial branch April 22, 2025 20:25
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.

3 participants