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

rust: add rust-analyzer option to unset #[cfg(test)] in specified crates #3156

Merged

Conversation

cassandracomar
Copy link
Contributor

this allows the user to still enable #[cfg(test)] in rust-analyzer
globally while not breaking dependencies that have different (broken)
behavior when #[cfg(test)] is set.

see:
- rust-lang/rust-analyzer#7225
- lf-/rust-analyzer@86c9e7b

@github-actions github-actions bot added client One or more of lsp-mode language clients rust labels Oct 18, 2021
this allows the user to still enable #[cfg(test)] in rust-analyzer
globally while not breaking dependencies that have different (broken)
behavior when #[cfg(test)] is set.

see:
    - rust-lang/rust-analyzer#7225
    - lf-/rust-analyzer@86c9e7b
"force rust-analyzer to unset `#[cfg(test)]` for the specified crates."
:type 'lsp-string-vector
:group 'lsp-rust-analyzer
:package-version '(lsp-mode . "6.2.2"))
Copy link
Member

Choose a reason for hiding this comment

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

The package version should be something higher 8.0.1

Copy link
Member

Choose a reason for hiding this comment

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

I fixed that after the merge.

@vikigenius
Copy link

Can we get this merged? Why is the CI failing? Seems to be some CMake issue unrelated to this PR.

My current rust project needs to unset cfg test so that RA works properly.

@yyoncho yyoncho merged commit 00e1a5a into emacs-lsp:master Nov 8, 2021
@yyoncho
Copy link
Member

yyoncho commented Nov 8, 2021

@vikigenius done.

@cassandracomar cassandracomar deleted the rust-analyzer-unset-cfg-test branch April 21, 2022 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client One or more of lsp-mode language clients rust
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants