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

Path is not automatically detected on OSX #1125

Open
adaschevici opened this issue Aug 15, 2020 · 7 comments
Open

Path is not automatically detected on OSX #1125

adaschevici opened this issue Aug 15, 2020 · 7 comments

Comments

@adaschevici
Copy link

Hi,

I've updated OSX to the last supplemental update and completion seems to have stopped working.
the rust-src component path seems to no longer be detected accurately.
Setting it manually seems to not work very well as it can't find libstd

it seems this path no longer exists:
export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"

Versions:
rustc 1.47.0-nightly (8e21bd063 2020-08-14)
rustup 1.22.1 (b01adbbc3 2020-07-08)
racer 2.1.37

Not sure what i am missing

@greym0uth
Copy link

It seems like on 2020-07-29 the src directory was removed and the library directory was introduced. 2020-07-28 build has the src directory, and 2020-07-29 has the library directory.

@mapkts
Copy link

mapkts commented Aug 24, 2020

I work around this by making RUST_SRC_PATH points to a stable release which do contains a src folder (something like .rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src).

@adaschevici
Copy link
Author

@Jaden-Giordano as per @mapkts suggestion i did a manual install of the but libstd seems to be missing in the clone of the rustc repo as described in the manual install section of racer, so still seems like something is missing

@jonas-hagen
Copy link

jonas-hagen commented Sep 1, 2020

Further, the libstd directory seems to be missing in nightly. This directory is used to validate the src path:

} else if !path.join("libstd").exists() {

So, I get the following error:

$ export RUST_SRC_PATH=~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/

$ racer complete 3 9 main.rs /tmp/racerABCDE
Unable to find libstd under RUST_SRC_PATH. N.B. RUST_SRC_PATH variable needs to point 
to the *src* directory inside a rust checkout e.g. "/home/foouser/src/rust/src". Current value 
""/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/libstd""

$ ls /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/
alloc         profiler_builtins          stdarch
backtrace     rtstartup                  term
core          rustc-std-workspace-alloc  test
panic_abort   rustc-std-workspace-core   unwind
panic_unwind  rustc-std-workspace-std
proc_macro    std

I did not find any resources on the renaming of these directories, maybe there are even more changes. Anybody else knows something about this?

Better title for this issue would maybe be "rust-src directories have been renamed in nightly" as it does not only affect MacOS.

@sigmaSd
Copy link

sigmaSd commented Oct 8, 2020

Looks like the new layout is already handled

// Secondly, try the new standard library layout, e.g. std/src/lib.rs

so maybe it just a matter of removing that assert.

@sigmaSd
Copy link

sigmaSd commented Oct 8, 2020

So its actually fixed in master e669f6b

@xuyizhe
Copy link
Contributor

xuyizhe commented Oct 15, 2020

Fixed some related issues in 3bcf543 and racer-rust/emacs-racer#144

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

6 participants