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

tests fail with panic #577

Closed
ecausarano opened this issue Nov 3, 2020 · 2 comments
Closed

tests fail with panic #577

ecausarano opened this issue Nov 3, 2020 · 2 comments

Comments

@ecausarano
Copy link

Hi,

running rustlings watch causes all exercises with a test to fail with no output

⚠️  Testing of exercises/if/if1.rs failed! Please try again. Here's the output:

Running with `cargo test' produces the following output:

---- exercise::test::test_exercise_with_output stdout ----
thread 'exercise::test::test_exercise_with_output' panicked at 'called `Result::unwrap()` on an `Err` value: ExerciseOutput { stdout: "", stderr: "error: Unrecognized option: \'show-output\'\n" }', src/libcore/result.rs:1084:5
rustc --version
rustc 1.38.0 (625451e37 2019-09-23)
rustlings --version
rustlings 4.1.0

on macOS Catalina 10.15.7 (19H2)

@seeplusplus
Copy link
Contributor

seeplusplus commented Nov 4, 2020

This looks to be due to the fact that show-output was introduced in rust 1.39.0:
rust-lang/rust#62600

Since running rustlings watch causes verify, this will execute the exercise in test mode (supplying --show-output).

Related: #422

@ecausarano
Copy link
Author

ecausarano commented Nov 4, 2020

Oh, that's odd... despite updating rust from brew it still reports 'rustc 1.38.0 (625451e37 2019-09-23)'.
I suspect I must have installed rust from a standalone package some time ago.

Perhaps rustlings could add a warning (or error-out) on an old enough version?

edit1: @seeplusplus - indeed an outdated install was the issue, thanks for pointing that out!

seeplusplus added a commit to seeplusplus/rustlings that referenced this issue Nov 4, 2020
seeplusplus added a commit to seeplusplus/rustlings that referenced this issue Nov 4, 2020
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

No branches or pull requests

3 participants