Skip to content

Conversation

Xuanwo
Copy link
Collaborator

@Xuanwo Xuanwo commented May 24, 2023

This PR enable backtrace feature for anyhow which helps a lot for debugging.

For example, after backtrace enabled, the output of error changed:

from

[2023-05-24T20:41:14Z ERROR sccache::server] ["openssl_sys"] fatal error: Not an archive file (invalid global header)

to

[2023-05-24T20:41:14Z ERROR sccache::server] ["openssl_sys"] fatal error: Not an archive file (invalid global header)
    
    Stack backtrace:
       0: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual
                 at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/result.rs:2065:27
       1: sccache::util::hash_all_archives::{{closure}}::{{closure}}::{{closure}}
                 at /home/xuanwo/Code/mozilla/sccache/src/util.rs:153:29
       2: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll

In which we know where this error come from.

@sylvestre
Copy link
Collaborator

could you please split your patch between the actual change and the reformat?

@codecov-commenter
Copy link

codecov-commenter commented May 24, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.09 ⚠️

Comparison is base (1c6ec75) 29.37% compared to head (50a2beb) 29.28%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1774      +/-   ##
==========================================
- Coverage   29.37%   29.28%   -0.09%     
==========================================
  Files          49       49              
  Lines       17626    17626              
  Branches     8507     8506       -1     
==========================================
- Hits         5177     5162      -15     
+ Misses       7357     7338      -19     
- Partials     5092     5126      +34     
Impacted Files Coverage Δ
src/lib.rs 5.58% <0.00%> (+0.16%) ⬆️

... and 12 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Xuanwo
Copy link
Collaborator Author

Xuanwo commented May 24, 2023

could you please split your patch between the actual change and the reformat?

DONE.

@Xuanwo Xuanwo merged commit b2faf16 into mozilla:main May 25, 2023
@Xuanwo Xuanwo deleted the add-backtrace-for-anyhow branch May 25, 2023 05:35
Alexei-Barnes added a commit to Alexei-Barnes/sccache that referenced this pull request May 26, 2023
feat: Enable backtrace for anyhow (mozilla#1774)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants