html5ever icon indicating copy to clipboard operation
html5ever copied to clipboard

Upgrading instructions for 0.25

Open kornelski opened this issue 5 years ago • 5 comments

I can't find release notes. I can't find a changelog. I can't find what has changed in the API, so I'm struggling to update my code.

122 | use html5ever::rcdom::{Handle, RcDom}; | ^^^^^ could not find rcdom in html5ever

It seems like 0.25 has been a major change of the API, and RcDom has been dropped entirely, all of my code is incompatible, and I don't even know where to start fixing it.

kornelski avatar Dec 19 '19 14:12 kornelski

The changes in 0.25 represent that RcDom was only ever intended as an internal API for tests and provides no guarantees around safety/correctness. If you wish to continue using it, the code is available at https://github.com/servo/html5ever/tree/master/rcdom.

jdm avatar Dec 19 '19 15:12 jdm

Kuchiki's tree representation is a better supported tree type: https://github.com/kuchiki-rs/kuchiki/blob/master/src/tree.rs

jdm avatar Dec 19 '19 15:12 jdm

better supported

Err I don’t know, nobody’s contributing to it at the moment.

SimonSapin avatar Dec 19 '19 15:12 SimonSapin

Thanks for recommendations.

Kuchiki doesn't use the latest version of html5ever. The test rcdom crate has dropped support for serialization (which I also relied on), so I it seems that I won't be able to upgrade for now.

kornelski avatar Dec 19 '19 18:12 kornelski

I have submitted https://github.com/kuchiki-rs/kuchiki/pull/65.

jdm avatar Dec 19 '19 18:12 jdm