Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Remove the RUST_SRC_PATH environment variable #185

Merged
merged 5 commits into from
Jul 15, 2021
Merged

Remove the RUST_SRC_PATH environment variable #185

merged 5 commits into from
Jul 15, 2021

Conversation

msrd0
Copy link
Contributor

@msrd0 msrd0 commented Oct 28, 2020

If the RUST_SRC_PATH env var was already set, we should keep that value and not change it.
If it was not set, rust-analyzer is very well capable of finding that path on its own.

Fixes #184

@msrd0 msrd0 changed the title Remove the RUST_SRC environment variable Remove the RUST_SRC_PATH environment variable Oct 28, 2020
Copy link

@reiterative reiterative left a comment

Choose a reason for hiding this comment

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

This change looks good to me, but it generates some warnings that need to be fixed:

  • The function rustcSysroot is now unused and should be removed.
  • The function serverEnv should also be modified to remove the redundant toolchain and cwd arguments.

If the RUST_SRC env var was already set, we should keep that value and not change it.
If it was not set, rust-analyzer is very well capable of finding that path on its own.

Fixes #184
@msrd0
Copy link
Contributor Author

msrd0 commented Oct 28, 2020

I fixed those warnings, not sure why the CI still fails.

@mmstick
Copy link

mmstick commented Oct 29, 2020

npm command not found

Copy link
Contributor

@aminya aminya left a comment

Choose a reason for hiding this comment

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

Thank you. It works as intended based on my test.

@aminya aminya added the bug label Jul 15, 2021
@aminya aminya merged commit a6a6cb7 into rust-lang:master Jul 15, 2021
@msrd0 msrd0 deleted the remove-src-path-env-var branch July 15, 2021 13:27
@msrd0
Copy link
Contributor Author

msrd0 commented Jul 16, 2021

Thank you for keeping this project alive 👏

@aminya
Copy link
Contributor

aminya commented Jul 17, 2021

Thank you for the contributions!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to start rust-analyzer because of corrupt env vars
4 participants