nim-lang / redis

Official redis wrapper for Nim.
Other
128 stars 35 forks source link

Can't compile Redis module #5

Closed diegogub closed 6 years ago

diegogub commented 6 years ago

Hello,

trying to compile it gives following error:

redis.nim(269, 57) template/generic instantiation from here redis.nim(278, 21) Error: invalid control flow: 'yield' within a constructor

euantorano commented 6 years ago

Interesting, the line in question is this: https://github.com/nim-lang/redis/blob/master/src/redis.nim#L278

This was valid code previously, I wonder if this is a regression in Nim? @dom96 might know better than I do 😄

yglukhov commented 6 years ago

This feature was disabled some time ago, it should be reenabled with this pr: https://github.com/nim-lang/Nim/pull/7704. Until then you can just move await out of seq constructor.

diegogub commented 6 years ago

@yglukhov thanks

euantorano commented 6 years ago

Interesting. I was able to run the tests when I last worked on this module, though that was just under a year ago now. Thanks for clearing it up @yglukhov!

kingsrd commented 6 years ago

hi there, I tried to move the "await" out of the seq constructor but get the following error instead?

~/.nimble/pkgs/redis-0.2.0/redis.nim(278, 13) Error: type mismatch: got <seq[Future[system.string]]> but expected 'seq[string]