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

Catch panics in the server and transmit them as errors to the client. #1981

Merged
merged 1 commit into from
Nov 23, 2023

Commits on Nov 22, 2023

  1. Catch panics in the server and transmit them as errors to the client.

    Currently, when the server panics, the client never gets a response, and
    the compilation gets stuck. The only indication of something going wrong
    is in the logs if they are enabled.
    
    With this change, the error is transmitted to the client, which then
    fails and prints it. For instance, one of the out-of-bound accesses
    fixed in mozilla#1980 now prints this on the client side before returning a
    non-zero exit code:
    
    sccache: encountered fatal error
    sccache: error: thread 'tokio-runtime-worker' panicked at src/compiler/c.rs:612:25: range end index 7 out of range for slice of length 1
    sccache: caused by: thread 'tokio-runtime-worker' panicked at src/compiler/c.rs:612:25: range end index 7 out of range for slice of length 1
    
    Fixes mozilla#756
    glandium committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    1569897 View commit details
    Browse the repository at this point in the history