racer-rust / emacs-racer

Racer support for Emacs
398 stars 48 forks source link

Do not expand environment variables #98

Closed svend closed 6 years ago

svend commented 6 years ago

Only expand racer-rust-src-path and racer-cargo-home variables, not RUST_SRC_PATH and RUST_SRC_PATH environment variables. This make the behavior of racer the same in Emacs and on the command line with these variables set. It will also allow RUST_SRC_PATH to be set to an empty string, which is required with racer installed via nixpkgs, where RUST_SRC_PATH should not be set.

https://github.com/NixOS/nixpkgs/blob/348f938c552dcfdc41e543dd20511b5d0e4e70f6/pkgs/development/tools/rust/racer/rust-src.patch

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.3%) to 64.247% when pulling 3fea98f80726df977a85bd8a52bc60a49dbc2777 on svend:nix into cb74060bbaff8e505ba36e20e4a3a763ee7dd4c8 on racer-rust:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.3%) to 64.247% when pulling 3fea98f80726df977a85bd8a52bc60a49dbc2777 on svend:nix into cb74060bbaff8e505ba36e20e4a3a763ee7dd4c8 on racer-rust:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.3%) to 64.247% when pulling 3fea98f80726df977a85bd8a52bc60a49dbc2777 on svend:nix into cb74060bbaff8e505ba36e20e4a3a763ee7dd4c8 on racer-rust:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.3%) to 64.247% when pulling 3fea98f80726df977a85bd8a52bc60a49dbc2777 on svend:nix into cb74060bbaff8e505ba36e20e4a3a763ee7dd4c8 on racer-rust:master.

svend commented 6 years ago

Racer installed via nixpkgs is patched to add the correct path to the rust source in the nixpkgs store. With this configuration, RUST_SRC_PATH should not bet set. I couldn't find a way with racer.el to not set RUST_SRC_PATH. With this patch, setting the RUST_SRC_PATH environment variable to an empty string results in racer run with this value, which racer treats the same as if it was not set.