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

0.1.1 fails to build with rust stable (1.69.0) #1

Closed
olivier-fs opened this issue May 19, 2023 · 2 comments
Closed

0.1.1 fails to build with rust stable (1.69.0) #1

olivier-fs opened this issue May 19, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@olivier-fs
Copy link

Nice to have process trees on Windows ; GUIs like Process Explorer or TMX are fine but they can't be used in scripts/tools.

I hit a minor issue : 0.1.1 builds and runs fine but only with +nightly:

 $ cargo install proctree
.
.
.
   Compiling proctree v0.1.1
error[E0554]: `#![feature]` may not be used on the stable release channel
 --> C:\Users\olivier\.cargo\registry\src\github.com-1ecc6299db9ec823\proctree-0.1.1\src\main.rs:1:12
  |
1 | #![feature(drain_filter)]
  |            ^^^^^^^^^^^^
$ cargo --version
cargo 1.69.0 (6e9a83356 2023-04-12)

Platform : Windows 10

Nightly :

 $ cargo install +nightly proctree
.
.
.
   Compiling proctree v0.1.1
    Finished release [optimized] target(s) in 23.20s
  Installing C:\Users\olivier\.cargo\bin\proctree.exe
   Installed package `proctree v0.1.1` (executable `proctree.exe`)
$ cargo +nightly --version
cargo 1.71.0-nightly (09276c703 2023-05-16)

Runs fine

$ proctree
├──0 Idle
├──4 System
│  ├──88 Secure System
│  ├──3628 Memory Compression
│  ├──536 smss.exe
│  └──156 Registry
├──684 bash.exe
├──936 csrss.exe
├──1028 wininit.exe
│  ├──1272 fontdrvhost.exe
│  ├──1120 LsaIso.exe
│  ├──1128 lsass.exe
│  └──1100 services.exe
│     ├──1888 svchost.exe

Good job !

@ynuwenhof
Copy link
Owner

Hey,

Unfortunately, the drain_filter function is still nightly only and requires the feature gate #![feature(drain_filter)] it might make sense to account for this in the installation instructions or change to a different approach until the API has been stabilized.

Kind Regards!

@ynuwenhof ynuwenhof added the bug Something isn't working label May 19, 2023
@olivier-fs
Copy link
Author

Hi

Yes sorry for having been unclear about "minor" issue : I meant that's only a doc issue, not an actual bug.

Though I greatly value the FP way, maybe a simple while + remove loop as in drain_filter will fit until this feature is stabilized (though it will perform worse).

Rust is gaining a lot of traction, and newcomers may not know about nightly toolchain.
Since I moved away from nodejs to tokio for my backend code I can't stand 'npm install' problems anymore, and I give myself duty to report anything that makes the rust experience sub-optimal, morevorer about tools I 'cargo install'.

Sincerely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants