codic12 / worm

A dynamic, tag-based window manager written in Nim
MIT License
711 stars 24 forks source link

can't compile because of function 'findClients' #91

Closed redwill17 closed 7 months ago

redwill17 commented 11 months ago

trying to compile with nimble gives me this error

/home/javu/build/worm/src/wm.nim(172, 6) Error: 'findClient' can have side effects
> /home/javu/build/worm/src/wm.nim(178, 18) Hint: 'findClient' calls routine via hidden pointer indirection

       Tip: 30 messages have been suppressed, use --verbose to show them.
nimble.nim(229)          buildFromDir

    Error:  Build failed for the package: worm

i know that side effect functions are called procs, so using that keyword for findClients i was able to compile the program, I haven't tested the binary yet and i'll make an update when I do, but how odd is this error? i'm using void linux and used xbps to install nimble, maybe that's part of the problem

Atrevix commented 11 months ago

I had the same problem, thanks for the fix.

codic12 commented 11 months ago

Looks like nim 2.0 has changed some things. Unfortunately I haven't had time to work on worm for a while. Could you try to make a PR for your change? Thanks!

Peter2121 commented 10 months ago

@redwill17

using that keyword for findClients i was able to compile the program

Could you, please, put the exact syntax anywhere?

codic12 commented 7 months ago

closed by #91 (and so sorry for the late reply)