status-im / nim-chronos

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

ambiguous identifier: `'Result'` #528

Closed griffith1deady closed 3 months ago

griffith1deady commented 3 months ago

Hi! the following code gives me error:

import chronos/[threadsync, asyncloop]

var anotherThread: Thread[ThreadSignalPtr]
var signal = ThreadSignalPtr.new().get

proc take(signal: ThreadSignalPtr) =
    await signal.wait()

    echo "get signal!"

anotherThread.createThread(take, signal)

.nimble\pkgs2\chronos-4.0.1-aa129e11c762418129fdb42d1119f1f51dea30fc\chronos\osutils.nim(41, 48) Error: ambiguous identifier: 'Result' -- use one of the following: results.Result: Result results.Result: Result

nim -v
Nim Compiler Version 2.1.1 [Windows: amd64]
Compiled at 2024-03-03
Copyright (c) 2006-2024 by Andreas Rumpf

active boot switches: -d:release
arnetheduck commented 3 months ago

Wipe your nimble directory and try again with a clean one

griffith1deady commented 3 months ago

Thanks, this help.