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

crash in rust src root: "could not find parent of path /" #2474

Closed
matthiaskrgr opened this issue Feb 22, 2018 · 3 comments
Closed

crash in rust src root: "could not find parent of path /" #2474

matthiaskrgr opened this issue Feb 22, 2018 · 3 comments

Comments

@matthiaskrgr
Copy link
Member

git clone http://github.com/rust-lang/rust/ --depth=1
cd ./rust/src
cargo clippy
thread 'main' panicked at 'could not find parent of path /', src/main.rs:124:48
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at libstd/sys_common/backtrace.rs:59
             at libstd/panicking.rs:206
   3: std::panicking::default_hook
             at libstd/panicking.rs:222
   4: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:400
   5: std::panicking::begin_panic_fmt
             at libstd/panicking.rs:347
   6: cargo_clippy::main::{{closure}}
             at src/main.rs:124
   7: <core::option::Option<T>>::unwrap_or_else
             at /checkout/src/libcore/option.rs:376
   8: cargo_clippy::main
             at src/main.rs:122
   9: std::rt::lang_start::{{closure}}
             at /checkout/src/libstd/rt.rs:74
  10: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:305
  11: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:102
  12: std::rt::lang_start_internal
             at libstd/panicking.rs:284
             at libstd/panic.rs:361
             at libstd/rt.rs:58
  13: std::rt::lang_start
             at /checkout/src/libstd/rt.rs:74
  14: main
  15: __libc_start_main
  16: _start

clippy 0.0.186
rustc 1.25.0-nightly (27a046e 2018-02-18)

@phansch
Copy link
Member

phansch commented Mar 30, 2018

@matthiaskrgr Hmm, the original error should have been fixed in 0.0.190 and #2585 because the offending code has been removed.

When I try this now, I get a different error:

$ git clone http://github.com/rust-lang/rust/ --depth=1
$ cd ./rust/src
$ cargo clippy                                                                                                                                                                                 
error: failed to read `/home/phansch/code/repros/rust/src/tools/clippy/Cargo.toml`                                                                                                             

Caused by:
  No such file or directory (os error 2)

The tools/clippy directory is completely empty, I'm not sure if that's correct.

@matthiaskrgr
Copy link
Member Author

Hi,
in the rustc repo tools/clippy is a submodule, its probably uninitialized (thus the empty directory).
If you run ./x.py I think that should fetch and initialize all the required submodules. :)

@phansch
Copy link
Member

phansch commented Mar 30, 2018

Thank you! With the submodule cloned, clippy works 🎉 (and reports a few lints). So I'm going ahead and close this.

@phansch phansch closed this as completed Mar 30, 2018
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

2 participants