Skip to content

Crashing on a disabled feature #13098

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

Closed
JosuGZ opened this issue Aug 23, 2022 · 5 comments
Closed

Crashing on a disabled feature #13098

JosuGZ opened this issue Aug 23, 2022 · 5 comments

Comments

@JosuGZ
Copy link

JosuGZ commented Aug 23, 2022

Rust analyzer is crashing with the following mensage from the openssl-src crate:

This perl implementation doesn't produce Windows like paths (with backward
slash directory separators).  Please use an implementation that matches your
building platform.

I'm getting the same problem when I try to build my project with the "ssl" feature, which enables the ssl features of the dependencies. But without that feature, the code builds fine (with no ssl support). So cargo build works with no problem.

Rust Analyzer aparently tries to build the openssl crate anyway.

Features of my project:

[features]
default = []
gpio = []
ssl = ["paho-mqtt/vendored-ssl"]

rust-analyzer version: rust-analyzer version: 0.3.1178-standalone (a670ff8 2022-08-21)

rustc version: rustc 1.62.1 (e092d0b6b 2022-07-16)

relevant settings: Nothing relevant, I'm not enabling "all features".

@bjorn3
Copy link
Member

bjorn3 commented Aug 23, 2022

https://stackoverflow.com/questions/43958861/openssl-perl-configure-mingw-exits-with-error-perl-implementation-doesnt-pro

It seems that if you are using the MinGW target, you have to compile from a MinGW shell for openssl to build. This is an issue in openssl.

@JosuGZ
Copy link
Author

JosuGZ commented Aug 23, 2022

https://stackoverflow.com/questions/43958861/openssl-perl-configure-mingw-exits-with-error-perl-implementation-doesnt-pro

It seems that if you are using the MinGW target, you have to compile from a MinGW shell for openssl to build. This is an issue in openssl.

That is why I have an ssl feature which is disabled by default. Cargo build and run work, but RA crashes. I only enable the feature when building from Linux.

@JosuGZ
Copy link
Author

JosuGZ commented Aug 24, 2022

It turns out that I had this on my workspace:

image

Apparently the variable has been renamed so it wasn't showing up as modified by the settings UI, but RA was still loading it.

I'm not sure whether this could be considered a bug.

@Veykril
Copy link
Member

Veykril commented Aug 24, 2022

We need to load the old names still for backwards compatability reasons with other clients unfortunately, so there is not much we can do about that

@JosuGZ
Copy link
Author

JosuGZ commented Aug 24, 2022

I'm closing this then, thanks!

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

No branches or pull requests

3 participants