Skip to content

Error index test integration needs to be more robust #34588

Closed
@alexcrichton

Description

@alexcrichton

We've been plauged today with problems related to the error index tests. Today the way these tests work are:

  • During compiling a crate with error codes, extra diagnostic information is emitted to a tmp/ directory.
  • Later the error_index_generator program runs, processing this diagnostic information and generating error-index.md
  • Then rustdoc is used to test this markdown file.

This setup is brittle for a few reasons:

  • Running the error index generator doesn't actually depend on the compilations of each crate, so you just have to conveniently sequence it after compiles have finished to get it to actually work.
  • The probing logic of the error index generator is not precise, it simply slurps up anything that looks like diagnostics. This means that if there's a bad or stale diagnostic file it'll get slurped up nonetheless.
  • Emitting files always has fun complications when you run processes concurrently, and this in the past forced us to fix this emission for multi-host builds (e.g. the nightlies)

The compiler should not jettison json files out the back when compiling and instead the error index generator should process the diagnostics directly. This sidesteps sequencing problems, stale problems, etc, and should be more robust.

Metadata

Metadata

Labels

C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions