PMunch/nimlsp

Crash on jsffi

keiviv opened this issue · 3 comments

Win 10, Sublime 4, nimlsp 0.4.0
Crashes on load with std/jsffi — including on the example from the official doc:

import std/jsffi

var document {.importc, nodecl.}: JsObject
var console {.importc, nodecl.}: JsObject
proc jq(selector: JsObject): JsObject {.importjs: "$$(#)".}

proc main =
  jq(document).ready(proc() = # <-- Crashes here.
    console.log("Hello nimlsp")
  )

The issue is not specific to jQuery, any specific js, or console — it crashes on anything js I've tested.

Pretty certain this is a nimsuggest bug. Could you try to run nimsuggest manually from a terminal and see if it is able to resolve anything from this file?

nimsuggest --log nimlsp_crash.nim
fatal.nim(53)            sysFatal
Error: unhandled exception: semcall.nim(235, 18) `nArg != nil`  [AssertionDefect]

Right, this is a nimsuggest issue and should be reported in the nimsuggest repository, preferably with a link to this one for visibility.