saem / vscode-nim

Other
179 stars 23 forks source link

undeclared identifier: newContext() with std/net #80

Closed RokkuCode closed 2 years ago

RokkuCode commented 2 years ago

With the following snippet from the official error i got an error but it compiles fine:

import std/net

let socket = newSocket()
let ctx = newContext()
wrapSocket(ctx, socket)
socket.connect("google.com", Port(443))

Result: Screenshot_20220314_035201

With hovering the newContext() I got: Screenshot_20220314_035132

RSDuck commented 2 years ago

see https://github.com/pragmagic/vscode-nim/issues/70 except that you need to supply the flag -d:ssl instead of --threads:on