Support environment variable CARGO_MANIFEST_PATH.#19751
Merged
ChayimFriedman2 merged 1 commit intorust-lang:masterfrom May 5, 2025
Merged
Support environment variable CARGO_MANIFEST_PATH.#19751ChayimFriedman2 merged 1 commit intorust-lang:masterfrom
ChayimFriedman2 merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
Thanks! |
|
How am I meant to set this environment variable in a way that affects Rust Analyzer? |
Contributor
|
@CGMossa You don't. Cargo sets this environment variables for crates/build scripts, and rust-analyzer needs to mimic Cargo. This is what this PR was about. You use this variable e.g. in build scripts; you don't set it in any way. |
|
Thanks. I also dug into more of rust analyzer and sort realized that... Well, it doesn't work how I anticipated. But I didn't know that rust analyzer have to mimic something. I just wish for a way to tell rust analyzer about a nested crate without having to use linkedproject.. But no need to worry about that here. Thanks |
Contributor
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CARGO_MANIFEST_PATHis an environment variable added in August 2024, pointing directly to the Cargo.toml of the current package. It was not supported by rust-analyzer. This PR aims to fix that.