Skip to content

rustc: Clean up error reporting #11620

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

Merged
merged 1 commit into from
Jan 18, 2014
Merged

Conversation

alexcrichton
Copy link
Member

This commit re-works how the monitor() function works and how it both receives
and transmits errors. There are a few cases in which the compiler can abort:

  1. A normal compiler error. In this case, the compiler raises a FatalError as
    the failure value of the task. If this happens, then the monitor task does
    nothing. It ignores all stderr output of the child task and it also
    suppresses the failure message of the main task itself. This means that on a
    normal compiler error just the error message itself is printed.
  2. A normal internal compiler error. These are invoked from sess.span_bug() and
    friends. In these cases, they follow the same path (raising a FatalError),
    but they will also print an ICE message which has a URL to go report a bug.
  3. An actual compiler bug. This happens whenever anything calls fail!() instead
    of going through the session itself. In this case, we print out stuff about
    RUST_LOG=2 and we by default capture all stderr and print via warn!() so it's
    only printed out with the RUST_LOG var set.

@brson
Copy link
Contributor

brson commented Jan 17, 2014

This is a lot better.

@alexcrichton
Copy link
Member Author

Updated to remove stuff about the RUST_LOG and it just always prints the stderr of the task.

This commit re-works how the monitor() function works and how it both receives
and transmits errors. There are a few cases in which the compiler can abort:

1. A normal compiler error. In this case, the compiler raises a FatalError as
   the failure value of the task. If this happens, then the monitor task does
   nothing. It ignores all stderr output of the child task and it also
   suppresses the failure message of the main task itself. This means that on a
   normal compiler error just the error message itself is printed.

2. A normal internal compiler error. These are invoked from sess.span_bug() and
   friends. In these cases, they follow the same path (raising a FatalError),
   but they will also print an ICE message which has a URL to go report a bug.

3. An actual compiler bug. This happens whenever anything calls fail!() instead
   of going through the session itself. In this case, we print out stuff about
   RUST_LOG=2 and we by default capture all stderr and print via warn!() so it's
   only printed out with the RUST_LOG var set.
bors added a commit that referenced this pull request Jan 18, 2014
This commit re-works how the monitor() function works and how it both receives
and transmits errors. There are a few cases in which the compiler can abort:

1. A normal compiler error. In this case, the compiler raises a FatalError as
   the failure value of the task. If this happens, then the monitor task does
   nothing. It ignores all stderr output of the child task and it also
   suppresses the failure message of the main task itself. This means that on a
   normal compiler error just the error message itself is printed.

2. A normal internal compiler error. These are invoked from sess.span_bug() and
   friends. In these cases, they follow the same path (raising a FatalError),
   but they will also print an ICE message which has a URL to go report a bug.

3. An actual compiler bug. This happens whenever anything calls fail!() instead
   of going through the session itself. In this case, we print out stuff about
   RUST_LOG=2 and we by default capture all stderr and print via warn!() so it's
   only printed out with the RUST_LOG var set.
@bors bors closed this Jan 18, 2014
@bors bors merged commit 2784313 into rust-lang:master Jan 18, 2014
@alexcrichton alexcrichton deleted the rustc-silent branch January 19, 2014 00:34
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.

3 participants