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

thread 'main' panicked at 'Failed to run 'compile' #190

Closed
salva-imm opened this issue Jul 6, 2019 · 7 comments
Closed

thread 'main' panicked at 'Failed to run 'compile' #190

salva-imm opened this issue Jul 6, 2019 · 7 comments
Labels
A-source Area: CLI source C-bug Category: Bug

Comments

@salva-imm
Copy link

salva-imm commented Jul 6, 2019

hi ,, im getting this error on running rustlings w or rustlings v after fixing variables1.rs :

thread 'main' panicked at 'Failed to run 'compile' command.: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:999:5```

my OS : ubuntu 18.04 
cargo and rustc are update
cargo path is correct 
@komaeda
Copy link
Contributor

komaeda commented Jul 8, 2019

Possibly related to #173, but I can't reproduce it :/

@MrFroop
Copy link
Contributor

MrFroop commented Jul 11, 2019

I noticed that this happened to me if I used emacs as an editor but not if I used vim. So after some digging the error seems to occur because of emacs file locking files. Emacs creates a .#<file name> in the same directory as the file it tries to modify to prevent simultaneous editing, and in the case of an exercise, this file is called .#<exercice_name>.rs. Since it ends with rs the verification loop is triggered, but the lock file is short-lived, so it is already gone when the unwrap on the file is called and thus causing a panic.

I submitted a pull request with a fix. #191

@komaeda
Copy link
Contributor

komaeda commented Jul 13, 2019

I released 1.4.0 which includes the fix, maybe that'll do it?

@salva-imm
Copy link
Author

@komaeda
unfortunatly im getting this error again ,, (1.4.0)

@MrFroop
im using vscode ,, it doesnt create any additional file ..

@MrFroop
Copy link
Contributor

MrFroop commented Jul 13, 2019

@salvador-immortal
I'm not able to reproduce the error with Vscode on Ubuntu 19.04. Could you run the command as ´RUST_BACKTRACE=1 rustlings watch´ and paste the stack trace?

@salva-imm
Copy link
Author

salva-imm commented Jul 14, 2019

@MrFroop
ubuntu 18.04

result :

⠁ Compiling exercises/variables/variables1.rs...
thread 'main' panicked at 'Failed to run 'compile' command.: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:999:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:197
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:211
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:474
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:381
   6: rust_begin_unwind
             at src/libstd/panicking.rs:308
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   8: core::result::unwrap_failed
   9: rustlings::exercise::Exercise::compile
  10: rustlings::verify::compile_only
  11: rustlings::main
  12: std::rt::lang_start::{{closure}}
  13: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:293
  14: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:85
  15: std::rt::lang_start_internal
             at src/libstd/panicking.rs:272
             at src/libstd/panic.rs:394
             at src/libstd/rt.rs:48
  16: main
  17: __libc_start_main

@iwahbe
Copy link

iwahbe commented Aug 15, 2019

I'm getting the same thing, except my traceback lis slightly different:
18:45 $ RUST_BACKTRACE=1 rustlings watch

18:45 $ RUST_BACKTRACE=1 rustlings watch
⠁ Compiling ~/Desktop/rustlings/exercises/variables/variables1.rs...
thread 'main' panicked at 'Failed to run 'compile' command.: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:1084:5
stack backtrace:
   0: std::panicking::default_hook::{{closure}}
   1: std::panicking::default_hook
   2: std::panicking::rust_panic_with_hook
   3: std::panicking::continue_panic_fmt
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: rustlings::exercise::Exercise::compile
   8: rustlings::verify::compile_only
   9: rustlings::main
  10: std::rt::lang_start::{{closure}}
  11: std::panicking::try::do_call
  12: __rust_maybe_catch_panic
  13: std::rt::lang_start_internal

@shadows-withal shadows-withal added A-source Area: CLI source C-bug Category: Bug E-help-wanted labels Nov 11, 2019
jrvidal added a commit to jrvidal/rustlings that referenced this issue Nov 11, 2019
bors added a commit that referenced this issue Nov 11, 2019
feat(cli): check for rustc before doing anything

Addresses #190. From the backtraces shown there, it seems like we're not able to launch `rustc` (which is odd, given that they probably compiled and installed `rustlings` 🤷‍♀️)
pedantic79 pushed a commit to pedantic79/rustlings that referenced this issue Apr 11, 2020
pedantic79 pushed a commit to pedantic79/rustlings that referenced this issue Apr 11, 2020
feat(cli): check for rustc before doing anything

Addresses rust-lang#190. From the backtraces shown there, it seems like we're not able to launch `rustc` (which is odd, given that they probably compiled and installed `rustlings` 🤷‍♀️)
ppp3 pushed a commit to ppp3/rustlings that referenced this issue May 23, 2022
ppp3 pushed a commit to ppp3/rustlings that referenced this issue May 23, 2022
feat(cli): check for rustc before doing anything

Addresses rust-lang#190. From the backtraces shown there, it seems like we're not able to launch `rustc` (which is odd, given that they probably compiled and installed `rustlings` 🤷‍♀️)
dmoore04 pushed a commit to dmoore04/rustlings that referenced this issue Sep 11, 2022
dmoore04 pushed a commit to dmoore04/rustlings that referenced this issue Sep 11, 2022
feat(cli): check for rustc before doing anything

Addresses rust-lang#190. From the backtraces shown there, it seems like we're not able to launch `rustc` (which is odd, given that they probably compiled and installed `rustlings` 🤷‍♀️)
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-bug Category: Bug
Projects
None yet
Development

No branches or pull requests

5 participants