Skip to content

cargotest: replace Servo with standalone Stylo - #160556

Open
HNO3Miracle wants to merge 2 commits into
rust-lang:mainfrom
HNO3Miracle:cargotest-use-stylo
Open

cargotest: replace Servo with standalone Stylo#160556
HNO3Miracle wants to merge 2 commits into
rust-lang:mainfrom
HNO3Miracle:cargotest-use-stylo

Conversation

@HNO3Miracle

@HNO3Miracle HNO3Miracle commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

The Servo entry in cargotest pins a 2019 checkout and only tests the
selectors package. Cargo still has to resolve the old Servo workspace,
including its large graph of Git dependencies, even though most of that
workspace is not covered by the test.

Both selectors and the stylo CSS engine now live in the standalone
servo/stylo repository. This PR replaces
the old Servo checkout with a recent Stylo revision and runs both
cargo test -p selectors and cargo test -p stylo from the same checkout.

Stylo's unit tests previously failed under the default Servo configuration
because shared tests used pseudo-elements that were only available in Gecko.
This was fixed in servo/stylo#436,
and this PR pins the resulting revision.

The cargotest documentation is updated to list Stylo instead of Servo.

Tests:

  • cargo test --manifest-path src/tools/cargotest/Cargo.toml
  • target/debug/cargotest "$(command -v cargo)" /tmp/cargotest-stylo stylo
  • ./x test tidy --set build.submodules=false

Closes #79404.

Signed-off-by: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
@rustbot

rustbot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

rustc-dev-guide is developed in its own repository. If possible, consider making this change to rust-lang/rustc-dev-guide instead.

cc @BoxyUwU, @tshepang

@rustbot rustbot added A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Aug 5, 2026
@rustbot

rustbot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

r? @clubby789

rustbot has assigned @clubby789.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789, jieyouxu

@clubby789

Copy link
Copy Markdown
Contributor

The full Stylo package is checked rather than tested because its current unit
tests do not compile under the default Servo configuration

What's the problem? Is this something we can address?

Signed-off-by: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
@HNO3Miracle

Copy link
Copy Markdown
Contributor Author

This was tracked in servo/stylo#308. The shared tests used Gecko pseudo-elements such as MozRubyText and FirstLine, which do not exist under the default Servo configuration.

Coincidentally, this was fixed upstream yesterday by servo/stylo#436, which also enabled cargo test --workspace in Stylo CI.

I have updated this PR to use the resulting revision (127b0b5cab6a6927552e889debb20beb031b79d1) and test both packages directly with cargo test -p selectors -p stylo. Locally, all 13 selectors tests and all 8 stylo tests pass. This also allowed me to remove the added cargo check support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restore Servo’s style crate in cargotest?

3 participants