Uh oh!
There was an error while loading. Please reload this page.
Return nonzero exit code if there are errors at a stop point - #22117
Conversation
rust-highfive
commented
Feb 9, 2015
(rust_highfive has picked a reviewer for you, use r? to override) |
nikomatsakis
commented
Feb 9, 2015
Can you add some kind of test for this? |
brson
commented
Feb 13, 2015
@nikomatsakis#22118 contains a bunch of test cases for this. Since those are the intended use it may be hard to dig up other relevant test cases. |
fhahn
commented
Feb 13, 2015
@nikomatsakis@brson yes, I would like to add the |
fhahn
commented
Feb 17, 2015
After making `rustc` fail on errors at a stop point, like `-Z parse-only`, in rust-lang#22117, the files in this PR also fail during the parse stage and should be moved as well. Sorry for spliting this move up in two PRs.
fhahn
commented
Feb 22, 2015
@brson what do you think about the new approach? Is it more reasonable? |
pczarn
commented
Mar 7, 2015
Needs rebase |
be1ba0d to
f29b4d7Comparefhahn
commented
Mar 7, 2015
Thanks, I have rebased the PR. |
bors
commented
Mar 17, 2015
☔ The latest upstream changes (presumably #23331) made this pull request unmergeable. Please resolve the merge conflicts. |
fhahn
commented
Mar 20, 2015
I have resolved the merge conflicts. |
bors
commented
Mar 24, 2015
☔ The latest upstream changes (presumably #23654) made this pull request unmergeable. Please resolve the merge conflicts. |
fhahn
commented
Mar 26, 2015
rebased this PR again |
bors
commented
Apr 3, 2015
☔ The latest upstream changes (presumably #23930) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
can this be globally added to parse-fail rather than in each test file?
nikomatsakis
commented
Apr 18, 2015
r+ @fhahn I just realized you've been dutifully rebasing this PR and I didn't notice at all. I apologize for that. In any case, I think it seems clearly good! |
nikomatsakis
commented
Apr 18, 2015
(Unfortunately, it does need to be rebased again...) |
fhahn
commented
Apr 18, 2015
@nikomatsakis no worries, all rebases were very minimal & straightforward |
pnkfelix
commented
Apr 20, 2015
@bors r=nikomatsakis |
bors
commented
Apr 20, 2015
📌 Commit 2a24e97 has been approved by |
bors
commented
Apr 20, 2015
At the moment, when compilation is stopped at a stop point (like `-Z parse-only`), `rustc` does not return an nonzero exit code even if there are errors (expect fatal ones, that cause it to panic immediately). As an example, compiling `src/test/compile-fail/doc-before-semi.rs` with `-Z parse-only` raises an error, but exists with 0. Note that I could not use `sess.abort_if_errors()` in the macro, because `sess` is passed by value and move at some point.
At the moment, when compilation is stopped at a stop point (like
-Z parse-only),rustcdoes not return an nonzero exit code even if there are errors (expect fatal ones, that cause it to panic immediately). As an example, compilingsrc/test/compile-fail/doc-before-semi.rswith-Z parse-onlyraises an error, but exists with 0.Note that I could not use
sess.abort_if_errors()in the macro, becausesessis passed by value and move at some point.