johnscillieri / psutil-nim

Port of python psutil to nim
MIT License
62 stars 21 forks source link

Does not work with nim 1.0.0+ #7

Closed kaushalmodi closed 4 years ago

kaushalmodi commented 4 years ago

Hello,

There was a backward incompatible change in nim 1.0.0 that removed isDigit for string args.

So with newer nim versions, this fails:

git clone https://github.com/johnscillieri/psutil-nim psutil
cd psutil
nim c -r tests/test_posix.nim    
psutil/src/psutil/psutil_linux.nim(158, 47) Error: type mismatch: got <string>
but expected one of:
proc isDigit(c: char): bool
  first type mismatch at position: 1
  required type for c: char
  but expression 'it.path' is of type: string

expression: isdigit(it.path)
kaushalmodi commented 4 years ago

Closing this as this is already fixed in the maintained fork https://github.com/juancarlospaco/psutil-nim .