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

Stop run from panicking when compile fails #141

Merged
merged 2 commits into from
Apr 7, 2019

Conversation

cjpearce
Copy link
Contributor

@cjpearce cjpearce commented Apr 7, 2019

Currently if you use the rustlings run command and your program fails to compile, rustlings will panic while trying to exit.

First I've added a couple of integration tests to cover this case, which also meant moving a few tests so that the new fixtures didn't cause verify_all_success to fail.

Then I noticed that the existing integration tests that test for failure pass even when rustlings panics, preventing the new tests from failing. I've updated the integration tests to distinguish between when rustlings has failed in the way that we want (exit code 1) rather than a panic (exit code 101).

Finally I fixed the actual panic, which was just caused by unwrapping when rustlings should probably be exiting cleanly.

@komaeda
Copy link
Contributor

komaeda commented Apr 7, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Apr 7, 2019

📌 Commit 0c7bd12 has been approved by komaeda

@bors
Copy link
Contributor

bors commented Apr 7, 2019

⌛ Testing commit 0c7bd12 with merge 78552eb...

bors added a commit that referenced this pull request Apr 7, 2019
Stop run from panicking when compile fails

Currently if you use the `rustlings run` command and your program fails to compile, rustlings will panic while trying to exit.

First I've added a couple of integration tests to cover this case, which also meant moving a few tests so that the new fixtures didn't cause `verify_all_success` to fail.

Then I noticed that the existing integration tests that test for failure pass even when rustlings panics, preventing the new tests from failing. I've updated the integration tests to distinguish between when rustlings has failed in the way that we want (exit code 1) rather than a panic (exit code 101).

Finally I fixed the actual panic, which was just caused by unwrapping when rustlings should probably be exiting cleanly.
@komaeda komaeda added A-source Area: CLI source C-enhancement Category: Enhancement labels Apr 7, 2019
@bors
Copy link
Contributor

bors commented Apr 7, 2019

☀️ Test successful - checks-travis
Approved by: komaeda
Pushing 78552eb to master...

@bors bors merged commit 0c7bd12 into rust-lang:master Apr 7, 2019
@cjpearce cjpearce deleted the fix/run-panics-on-compile-fail branch April 7, 2019 20:20
pedantic79 pushed a commit to pedantic79/rustlings that referenced this pull request Apr 11, 2020
…, r=komaeda

Stop run from panicking when compile fails

Currently if you use the `rustlings run` command and your program fails to compile, rustlings will panic while trying to exit.

First I've added a couple of integration tests to cover this case, which also meant moving a few tests so that the new fixtures didn't cause `verify_all_success` to fail.

Then I noticed that the existing integration tests that test for failure pass even when rustlings panics, preventing the new tests from failing. I've updated the integration tests to distinguish between when rustlings has failed in the way that we want (exit code 1) rather than a panic (exit code 101).

Finally I fixed the actual panic, which was just caused by unwrapping when rustlings should probably be exiting cleanly.
ppp3 pushed a commit to ppp3/rustlings that referenced this pull request May 23, 2022
…, r=komaeda

Stop run from panicking when compile fails

Currently if you use the `rustlings run` command and your program fails to compile, rustlings will panic while trying to exit.

First I've added a couple of integration tests to cover this case, which also meant moving a few tests so that the new fixtures didn't cause `verify_all_success` to fail.

Then I noticed that the existing integration tests that test for failure pass even when rustlings panics, preventing the new tests from failing. I've updated the integration tests to distinguish between when rustlings has failed in the way that we want (exit code 1) rather than a panic (exit code 101).

Finally I fixed the actual panic, which was just caused by unwrapping when rustlings should probably be exiting cleanly.
dmoore04 pushed a commit to dmoore04/rustlings that referenced this pull request Sep 11, 2022
…, r=komaeda

Stop run from panicking when compile fails

Currently if you use the `rustlings run` command and your program fails to compile, rustlings will panic while trying to exit.

First I've added a couple of integration tests to cover this case, which also meant moving a few tests so that the new fixtures didn't cause `verify_all_success` to fail.

Then I noticed that the existing integration tests that test for failure pass even when rustlings panics, preventing the new tests from failing. I've updated the integration tests to distinguish between when rustlings has failed in the way that we want (exit code 1) rather than a panic (exit code 101).

Finally I fixed the actual panic, which was just caused by unwrapping when rustlings should probably be exiting cleanly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-source Area: CLI source C-enhancement Category: Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants