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

Add missing processenv feature to winapi dependency in Cargo.toml #379

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

kvnxiao
Copy link
Contributor

@kvnxiao kvnxiao commented Aug 19, 2024

Fixes this error when compiling on Windows:

error[E0432]: unresolved import `winapi::um::processenv`
   --> C:\Users\kvnxiao\.cargo\registry\src\index.crates.io-6f17d22bba15001f\ludusavi-0.25.0\src/main.rs:94:9
    |
94  |         processenv::SetStdHandle,
    |         ^^^^^^^^^^ could not find `processenv` in `um`
    |
note: found an item that was configured out
   --> C:\Users\kvnxiao\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\um\mod.rs:190:40
    |
190 | #[cfg(feature = "processenv")] pub mod processenv;
    |                                        ^^^^^^^^^^
    = note: the item is gated behind the `processenv` feature

For more information about this error, try `rustc --explain E0432`.
error: could not compile `ludusavi` (bin "ludusavi") due to 1 previous error

Fixes this error when compiling on Windows:

```
error[E0432]: unresolved import `winapi::um::processenv`
   --> C:\Users\kvnxiao\.cargo\registry\src\index.crates.io-6f17d22bba15001f\ludusavi-0.25.0\src/main.rs:94:9
    |
94  |         processenv::SetStdHandle,
    |         ^^^^^^^^^^ could not find `processenv` in `um`
    |
note: found an item that was configured out
   --> C:\Users\kvnxiao\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\um\mod.rs:190:40
    |
190 | #[cfg(feature = "processenv")] pub mod processenv;
    |                                        ^^^^^^^^^^
    = note: the item is gated behind the `processenv` feature

For more information about this error, try `rustc --explain E0432`.
error: could not compile `ludusavi` (bin "ludusavi") due to 1 previous error
```
@mtkennerly
Copy link
Owner

Hi! Thanks for the PR :)

I wonder why this wasn't causing a problem on my Windows system or in the GitHub build. Out of curiosity, what version of Rust and Windows are you using?

@kvnxiao
Copy link
Contributor Author

kvnxiao commented Aug 19, 2024

Not sure if this is an issue on Rust nightly because that's what I'm using. I also installed via cargo install ludusavi without the --locked flag. I'm on the latest build of Windows 11 Version 23H2 OS Build 22631.4037

This seems to be an issue similar to denoland/deno#24212

@mtkennerly mtkennerly merged commit 4defdc9 into mtkennerly:master Aug 19, 2024
9 checks passed
@mtkennerly
Copy link
Owner

Gotcha. I only ever use stable, so maybe that's why. Not sure 😅

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.

2 participants