saem/vscode-nim

build is broken on latest Nim source

RSDuck opened this issue · 0 comments

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:
nim-lang/Nim#19530

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

export asyncjs except then

which solves the problem.