Open Leorii opened 3 years ago
I think I found the source of the bug: https://github.com/racer-rust/racer/pull/1130/files#r489576403
I'm happy to submit a PR for this if anyone would like to tell me if I'm headed in the right direction here.
I have a temporary fix on my system that I believe also confirms that this is the issue. I have symlinked the $RUST_SRC_PATH/libstd
directory to $RUST_SRC_PATH/std/src
, and that seems to work fine for now. But I would still be happy to submit a PR if this is a valid issue/concern.
If anyone else wants the temporary fix, do this:
SOURCE_DIR=$(rustc --print sysroot)/lib/rustlib/src/rust/src
mkdir $SOURCE_DIR/std
ln -s $SOURCE_DIR/libstd $SOURCE_DIR/std/src
Thanks, I think you're in the right direction as I commented.
Since recently I don't have enough time to maintain this project sufficiently, PR is very welcome.
I think the PR might not be very complicated: we just have to add older locations looking #1130.
Whoops, forgot about this. I'd be happy to submit a PR for it :D
Panic occurs when typing a std module name.
Example
'thread \'searcher\' panicked at \'Failed load file "$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/std/src/primitive_docs.rs": Os { code: 2, kind: NotFound, message: "No such file or directory" }\', $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/racer-2.1.38/src/racer/core.rs:816:14\nnote: run with
RUST_BACKTRACE=1
environment variable to display a backtrace\n'Thoughts
I believe this might have something to do with #1130. The completion
does still work (it attempts to find the source from the original rust directory layout), but then I think it stilltries to find the source from the new layout and fails at that.