nim-lang / redis

Official redis wrapper for Nim.
Other
126 stars 34 forks source link

nim v0.19 string nil issue #14

Closed jorisbontje closed 5 years ago

jorisbontje commented 5 years ago

With nim v0.19.0:

➜  redis git:(master) nimble test
  Executing task test in /Users/user/Projects/nim/redis/redis.nimble
../src/redis.nim(149, 61) template/generic instantiation from here
../src/redis.nim(151, 12) Error: type mismatch: got <nil> but expected 'string'
stack trace: (most recent call last)
/Users/user/Projects/nim/redis/redis.nimble(18) testTask
/Users/user/.choosenim/toolchains/nim-0.19.0/lib/system/nimscript.nim(237) exec
/Users/user/.choosenim/toolchains/nim-0.19.0/lib/system/nimscript.nim(237, 7) Error: unhandled exception: FAILED: nim c -r tests/main.nim

My understanding is that this might already be addressed by PR #10

dom96 commented 5 years ago

Yeah, #10 has some outstanding things that need to be done though.

As a workaround you can compile with --laxStrings:on.

Araq commented 5 years ago

It's --nilseqs:on.

dom96 commented 5 years ago

Ahh yes. Sorry, my bad.

On Fri, 28 Sep 2018, 00:31 Andreas Rumpf, notifications@github.com wrote:

It's --nilseqs:on.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nim-lang/redis/issues/14#issuecomment-425348292, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPDe8Nlnga-wfvhhRtlUDFeoD2zL4Phks5ufdBKgaJpZM4W8_Wa .

sinkingsugar commented 5 years ago

Any update? It seems that there is no working solution for Nim to use redis properly right now. https://github.com/xmonader/nim-redisclient crashes the compiler even!

nilseqs is not an option all my code is aware of not nil seqs and strings... :cry:

dom96 commented 5 years ago

@sinkingsugar not much we can do except get #10 in shape. If you could help out that would be great :)

dom96 commented 5 years ago

Should be fixed now.