status-im / nim-chronos

Chronos - An efficient library for asynchronous programming
https://status-im.github.io/nim-chronos/
Apache License 2.0
362 stars 51 forks source link

compiler error on simple async proc #426

Closed doongjohn closed 1 year ago

doongjohn commented 1 year ago
import pkg/chronos

proc f {.async.} =
  discard

waitFor f()

compile error (WSL2 nimble build)

~/.nimble/pkgs2/chronos-3.2.0-5783067584ac6812eb64b8454ea6f9c97ff1262a/chronos/asyncloop.nim(850, 35) template/generic instantiation of `unregister2` from h
ere
~/.nimble/pkgs2/chronos-3.2.0-5783067584ac6812eb64b8454ea6f9c97ff1262a/chronos/ioselects/ioselectors_epoll.nim(459, 22) Error: attempting to call undeclared
 routine: 'none'

compile error (WSL2 nimble build -d:mingw)

# WSL2 nimble build -d:mingw
/home/doongjohn/.nimble/pkgs2/chronos-3.2.0-5783067584ac6812eb64b8454ea6f9c97ff1262a/chronos/asyncloop.nim(1286, 12) Error: attempting to call undeclared routine: 'some'

nim version:

Nim Compiler Version 1.9.5 [Linux: amd64]
Compiled at 2023-07-28
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: f1ac979184ad7fa0d8c44415e781181a00a0095f
active boot switches: -d:release
doongjohn commented 1 year ago

deleting .nimble/pkg2 and reinstalling the package fixed the issue