You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm seeing something very strange as I'm working through the koans. It's probably not a bug with the koans per se, so feel free to direct me to a more appropriate place but: I only see test failures on even koans, but the even koans' failures include the odd failures.
$ cargo run
Compiling koans v0.2.2 (file:///Users/seth/Code/Public/rust-koans)
Finished dev [unoptimized + debuginfo] target(s) in 0.50s
Running `target/debug/koans`
running 1 test
test path_to_enlightenment::the_truth ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Ahead of you lies addition.
Eternity lies ahead of us, and behind. Your path is not yet finished.
But immediately running cargo run again, I succeed unexpectedly:
$ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.03s
Running `target/debug/koans`
running 1 test
test path_to_enlightenment::the_truth ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Ahead of you lies boolean.
Eternity lies ahead of us, and behind. Your path is not yet finished.
I note that there's still only one test, and it's for the_truth. What happened to addition? Another cargo run yields both addition and booleans:
$ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
Running `target/debug/koans`
error[E0425]: cannot find value `__` in this scope
--> src/koans/addition.rs:3:20
|
3 | assert_eq!(1 + __, 2)
| ^^ not found in this scope
error[E0425]: cannot find value `__` in this scope
--> src/koans/boolean.rs:18:24
|
18 | assert!("Stuff" == __);
| ^^ not found in this scope
error[E0425]: cannot find value `__` in this scope
--> src/koans/boolean.rs:25:20
|
25 | assert!(num == __);
| ^^ not found in this scope
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0425`.
To learn more, run the command again with --verbose.
Meditate on your approach and return. Mountains are merely mountains.
A fun fact is that I can restore the invalid condition at will:
$ echo 'koan!("the_truth");' > src/path_to_enlightenment.rs
$ cargo run; cargo run
...
Ahead of you lies addition.
Eternity lies ahead of us, and behind. Your path is not yet finished.
...
Ahead of you lies boolean.
Eternity lies ahead of us, and behind. Your path is not yet finished.
And it seems like the path is working like it should:
$ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
Running `target/debug/koans`
running 1 test
test path_to_enlightenment::the_truth ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Ahead of you lies addition.
Eternity lies ahead of us, and behind. Your path is not yet finished.
$ cat src/path_to_enlightenment.rs
koan!("the_truth");
koan!("addition");
What's extra neat about this situation is that it's quite stable until I modify any of the files, either by completing the addition koan or even so much as a touch, which breaks the spell:
$ for i in {1..100}; do cargo test -q > /dev/null; done
$ cargo test -q
running 1 test
test path_to_enlightenment::the_truth ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
$ touch src/main.rs
$ cargo run
Compiling koans v0.2.2 (file:///Users/seth/Code/Public/rust-koans)
Finished dev [unoptimized + debuginfo] target(s) in 0.52s
Running `target/debug/koans`
error[E0425]: cannot find value `__` in this scope
...
I don't know if this is related to #36, but I am running a very recent version of rust:
Do you think you could point me in the right direction? This behavior feels like a cargo bug, but I might be missing something obvious. Oh, and I wanted to be sure to say thank you for such a fun intro to the language!
The text was updated successfully, but these errors were encountered:
Hi! I'm seeing something very strange as I'm working through the koans. It's probably not a bug with the koans per se, so feel free to direct me to a more appropriate place but: I only see test failures on even koans, but the even koans' failures include the odd failures.
Let me explain. I start as so:
cargo run
gives me what I expect to see:But immediately running
cargo run
again, I succeed unexpectedly:I note that there's still only one test, and it's for
the_truth
. What happened to addition? Anothercargo run
yields both addition and booleans:A fun fact is that I can restore the invalid condition at will:
And it seems like the path is working like it should:
What's extra neat about this situation is that it's quite stable until I modify any of the files, either by completing the
addition
koan or even so much as atouch
, which breaks the spell:I don't know if this is related to #36, but I am running a very recent version of rust:
Do you think you could point me in the right direction? This behavior feels like a cargo bug, but I might be missing something obvious. Oh, and I wanted to be sure to say thank you for such a fun intro to the language!
The text was updated successfully, but these errors were encountered: