worm icon indicating copy to clipboard operation
worm copied to clipboard

can't compile because of function 'findClients'

Open redwill17 opened this issue 2 years ago • 3 comments

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

redwill17 avatar Nov 11 '23 20:11 redwill17

I had the same problem, thanks for the fix.

Atrevix avatar Nov 12 '23 15:11 Atrevix

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!

codic12 avatar Nov 30 '23 02:11 codic12

@redwill17

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

Could you, please, put the exact syntax anywhere?

Peter2121 avatar Dec 25 '23 21:12 Peter2121

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

codic12 avatar Mar 30 '24 02:03 codic12