Skip to content
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

Split delayed bugs into has-errored and will-error halves. #121016

Closed
wants to merge 2 commits into from

Commits on Feb 13, 2024

  1. Optimize delayed_bug handling.

    Once we have emitted at least one error, delayed bugs won't be used. So
    we can (a) we can (a) discard any existing delayed bugs, and (b) stop
    recording any new delayed bugs.
    
    This eliminates a longstanding `FIXME` comment. There should be no
    soundness issues because it's not possible to un-emit an error.
    nnethercote committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    b3b092d View commit details
    Browse the repository at this point in the history
  2. Split delayed bugs into has-errored and will-error halves.

    This commit adds new `{span_,}assert_has_errors` methods implementing
    the simpler has-errored cases, and leaves the existing
    `{span_,}delayed_bug` methods for the will-error cases.
    
    It also converts as many cases as possible to has-errored. I did this by
    converting every case to has-errored, then running tests and converting
    back to will-error every case that caused an assertion in the test
    suite. The test suite doesn't have perfect coverage so it's possible
    that there are a few more has-errored cases that will need conversion
    back to will-error. Also, some of the will-error cases might actually be
    a mixture of has-errored and will-error. But it's hard to do this
    perfectly without carefully going through every individual case, which
    would be painful, and an imperfect split still gets most of the
    benefits.
    nnethercote committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    33a6833 View commit details
    Browse the repository at this point in the history