Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Partially update selectors #250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fhanau
Copy link

@fhanau fhanau commented Dec 5, 2024

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
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

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