Skip to content

refactor: replace kuchikiki with dom_query - #1671

Merged
Legend-Master merged 14 commits into
tauri-apps:devfrom
thomaseizinger:chore/replace-kuchikiki-domquery
Mar 2, 2026
Merged

refactor: replace kuchikiki with dom_query#1671
Legend-Master merged 14 commits into
tauri-apps:devfrom
thomaseizinger:chore/replace-kuchikiki-domquery

Conversation

@thomaseizinger

Copy link
Copy Markdown
Contributor

The kuchikiki dependency has not been actively maintained in a while and pulls in a lot of old dependencies. We can replace fairly easily with the more maintained dom_query crate.

See tauri-apps/tauri#14958 for details.

@thomaseizinger
thomaseizinger requested a review from a team as a code owner February 17, 2026 05:22
@thomaseizinger

Copy link
Copy Markdown
Contributor Author

I noticed that this code doesn't have any tests. Should we extract this into a non-Android gated module somewhere and write some tests that can run in CI?

@github-actions

github-actions Bot commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

Package Changes Through a4347ba

There are 1 changes which include wry with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
wry 0.54.2 0.54.3

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@FabianLars

Copy link
Copy Markdown
Member

thanks for the pr! much appreciated :) cargo update derive_more --precise 2.0.1 or something like that should fix CI error.

I noticed that this code doesn't have any tests. Should we extract this into a non-Android gated module somewhere and write some tests that can run in CI?

Sounds reasonable but it wouldn't be a blocker for me

@thomaseizinger

Copy link
Copy Markdown
Contributor Author

thanks for the pr! much appreciated :) cargo update derive_more --precise 2.0.1 or something like that should fix CI error.

Done!

@thomaseizinger

Copy link
Copy Markdown
Contributor Author

I noticed that this code doesn't have any tests. Should we extract this into a non-Android gated module somewhere and write some tests that can run in CI?

Sounds reasonable but it wouldn't be a blocker for me

I don't want to break anything so I'll see to write a test for this.

@Legend-Master

Legend-Master commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

I have not got the time to take a closer look yet, just from a quick browse, it seems like there's https://crates.io/crates/scraper which is much more popular, do we have any reason choosing dom_query over it?

Never mind, its main branch moved to edition 2024 last month which requires a MSRV bump

@FabianLars

Copy link
Copy Markdown
Member

Never mind, its main branch moved to edition 2024 last month which requires a MSRV bump

wouldn't be a blocker imo. we're getting closer to edition 2024 by the day

@thomaseizinger

Copy link
Copy Markdown
Contributor Author

I'd prefer merging something sooner and not blocking on an MSRV upgrade. Once the tests are in place, it should be easy to migrate though.

@thomaseizinger
thomaseizinger force-pushed the chore/replace-kuchikiki-domquery branch from a10128f to 1fa48b3 Compare February 17, 2026 22:51

@Legend-Master Legend-Master left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like the failed miri test is from servo/stylo#299

Comment thread Cargo.toml Outdated
Comment thread Cargo.toml Outdated
Legend-Master
Legend-Master previously approved these changes Mar 1, 2026

@Legend-Master Legend-Master left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you also add change file?

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addeddom_query@​0.25.110010093100100

View full report

@thomaseizinger

Copy link
Copy Markdown
Contributor Author

Could you also add change file?

Done!

@Legend-Master

Copy link
Copy Markdown
Contributor

Thanks for the work and patience

@Legend-Master
Legend-Master merged commit 146e36e into tauri-apps:dev Mar 2, 2026
21 checks passed
chriscraws pushed a commit to chriscraws/wry that referenced this pull request May 13, 2026
* refactor: replace `kuchikiki` with `dom_query`

* Downgrade `derive_more`

* Add unit tests

* Minor refactoring

* Fix compile and reserve single responder

* Clean up add `head` code

* More cleanups

* Move to android

* Disable `dom_query` default features

* Fix test

* Move module back to root for CI

* Downgrade `dlopen2_derive`

* Revert unrelated lock file changes

* Add changes file

---------

Co-authored-by: Tony <legendmastertony@gmail.com>
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