saem / vscode-nim

Other
177 stars 23 forks source link

build is broken on latest Nim source #79

Closed RSDuck closed 2 years ago

RSDuck commented 2 years ago

the error is

C:\...\vscode-nim\src\nimProjects.nim(104, 9) Error: expression 'then(findFiles(vscode.workspace, to(conf, cstring)), proc (res: Array[VscodeUri]) = if to(   
    toJs(res), bool) and
  0 < len(res):
  add(projects, toProjectInfo(res[0].fsPath))
, nil)' is of type 'A' and has to be used (or discarded)

which is due to this: https://github.com/nim-lang/Nim/pull/19530

As a workaround in jsPromise.nim line 2 can be changed to

export asyncjs except then

which solves the problem.