-
Notifications
You must be signed in to change notification settings - Fork 893
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
[Speedreader] Update to kuchikiki 0.8.2 #18488
Conversation
CI failures are the |
@rillian is this waiting for something still? |
It was waiting for the rust built rewrite to land. Now it just needs redoing on top of those changes, and reviewing and updating the tests. I won't be work on it until August, so anyone feel free to take it over. |
*bump* |
a332fcb
to
3d19bda
Compare
test/data/speedreader/rewriter/pages/news_pages/www.csmonitor.com/distilled.html
Show resolved
Hide resolved
test/data/speedreader/rewriter/pages/news_pages/www.nbcdfw.com/distilled.html
Show resolved
Hide resolved
test/data/speedreader/rewriter/pages/news_pages/www.nbcdfw.com/distilled.html
Show resolved
Hide resolved
test/data/speedreader/rewriter/pages/news_pages/www.nbcdfw.com/distilled.html
Show resolved
Hide resolved
test/data/speedreader/rewriter/pages/news_pages/www.nbcdfw.com/distilled.html
Show resolved
Hide resolved
I redid the patch on top of the new rust build integration. Haven't updated |
3d19bda
to
760ab8f
Compare
test/data/speedreader/rewriter/pages/news_pages/www.eonline.com/distilled.html
Show resolved
Hide resolved
test/data/speedreader/rewriter/pages/news_pages/www.newsday.com/distilled.html
Show resolved
Hide resolved
c74e8cd
to
35f4522
Compare
35f4522
to
e5419cb
Compare
e5419cb
to
9f63d8c
Compare
0d7325f
to
2887779
Compare
2887779
to
c972204
Compare
321e16d
to
a91e8a4
Compare
@antonok-edm @bridiver Finally got this to pass CI. Ready for review again. |
Remove obsolete benchmark target and fix relative path to the kuchiki dependency so `cargo check` passes in the local crate directory for the rust code. This facilitates local testing and comparison between cargo and the gn builds. For the same reason, add a similar diversion to the ffi crate. Each top-level Cargo.toml needs to declare depencency patches separately.
We renamed our fork of the kuchiki tree-handling crate since upstream is unmaintained. It's easier to build against released crates now that we're vendoring, so move to the new publication crate name. This also addresses a `cargo audit` warning about the unmaintained dependency. Note however that we're still using a brave-specific fork from git here, so the crate itself is still installed from DEPS. This adds a new transitive dependency on `indexmap`, which is used to roundtrip html attributes with stable ordering so unit tests don't need trivial updates whenever we touch something. This dependency was for a while available in upstream chromium, but has since been dropped, so we're using our own copy under brave/third_party/rust. kuchikiki 0.8.2 specifies newer versions of its other dependencies but seems to still work when built against the old releases, so those are left to another commit. This replaces the DEPS entry with a copy of the source from https://github.com/brave/kuchikiki for simpler updating. Note that this is still a patched version, different from the 0.8.2 package published on crates.io.
Attribute ordering in the simplified pages has changed, verified by running `tidy --sort-attributes alpha` on both the new and old versions from the failure report. Otherwise where are no changes to document content or structure. Fixes SpeedreaderRewriterPagesTest.CheckPages unit test failures.
Lint fixes on the new speedreader code.
Document each file as MPL 2.0-licensed, per code policy. Addresses an `npm run presubmit` warning.
The `indexmap` crate tries to detect with a build script whether the `std` library crate is available. This fails on our android integration builds: ACTION //brave/third_party/rust/indexmap/v1:indexmap_lib_v1_build_script_output(//build/toolchain/android:android_clang_x86) error[E0463]: can't find crate for `std` | = note: the `i686-linux-android` target may not be installed However, the check can be overridden by explicitly requesting the feature, and here we do so in our build. This is the default in the newer v2 release of the crate, so this change is likely to remain correct going forward.
653cc98
to
2ecf050
Compare
Replaced DEPS checkout with a vendored copy of the kuchikiki crate source; rebased past adjacent changes. |
Update to our renamed fork to address unmaintained crate warnings about the
kuchiki
crate. Also cleans up some obsolete code.NB This should probably wait until the rust build rework lands and be redone with the correct vendoring updates, but I wanted to get the source changes tested to make sure the new version will work for us.
Resolves brave/brave-browser#29079
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run lint
,npm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: