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

Do not expand environment variables #98

Merged
merged 1 commit into from Jul 9, 2018
Merged

Conversation

svend
Copy link
Contributor

@svend svend commented Mar 12, 2018

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

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
Copy link

Coverage Status

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

3 similar comments
@coveralls
Copy link

Coverage Status

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

@coveralls
Copy link

Coverage Status

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

@coveralls
Copy link

Coverage Status

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

@svend
Copy link
Contributor Author

svend commented Mar 12, 2018

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.

Copy link
Member

@Wilfred Wilfred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these changes make sense. We've seen a lot of code churn in these settings to accommodate all the different use cases (you're the first to mention Nix I think). We'll probably see even more in future :)

@Wilfred Wilfred merged commit dd7f179 into racer-rust:master Jul 9, 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

Successfully merging this pull request may close these issues.

None yet

3 participants