rust-lang / atom-ide-rust

Rust IDE support for Atom, powered by the Rust Analyzer or Rust Language Server
MIT License
259 stars 43 forks source link

Multi-Crate repo #68

Closed dannyfritz closed 6 years ago

dannyfritz commented 6 years ago

I get an error when I try to edit a folder that contains many crates. So the Cargo.toml files are not at the root, but in the folders. Seems RLS is checking for a Cargo.toml at the root of my folder instead of starting where my main.rs file is.

Two examples of multi-crate repos:

This is the error:

Error reading manifest path: ErrorMessage { msg: "could not find Cargo.toml in C:\\Users\\danny\\Dev\\chip8\\ or any parent directory" }

stack backtrace:
0: 0x7ff755ab9529 - git_reference_type
1: 0x7ff755ab9a7e - git_reference_type
2: 0x7ff755ab8a80 - git_reference_type
3: 0x7ff75596b213 - git_commit_tree_id
4: 0x7ff75596b6d0 - git_commit_tree_id
5: 0x7ff7552844bd - 
6: 0x7ff7551566a5 - 
7: 0x7ffa3a1cae12 - _rust_maybe_catch_panic
8: 0x7ff7551d4b7b - 
9: 0x7ffa3a1c8b4f - std::sys::windows::thread::Thread::new::he6cb72092aa085f2
10: 0x7ffa7a731fe4 - BaseThreadInitThunk

Rust (RLS) C:\Users\danny\Dev\chip8\

atom_2018-03-15_11-54-20

dannyfritz commented 6 years ago

following https://github.com/mehcode/atom-ide-rust#multi-crate-projects made the error go away, but I don't seem to be getting any features outside of code formatting now.

dannyfritz commented 6 years ago

Ran a cargo build and rust-ide started working again. Sorry for the spam! Closing issue and am a happy camper. 👍

alexheretic commented 6 years ago

Glad you worked through it!

It's fair enough to report it though as it still isn't idea how we handle this. We've gone from just not working, to erroring without telling you why, to finally erroring and telling you why (https://github.com/mehcode/atom-ide-rust/issues/49).

The message comes from Rls, but perhaps we can do more. I'll raise an issue as a placeholder.