Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selectors, Error: undeclared field: 'OSErrorCode' on macOS #11124

Closed
dylanagreen opened this issue Apr 27, 2019 · 1 comment

Comments

Projects
None yet
4 participants
@dylanagreen
Copy link

commented Apr 27, 2019

The following code causes an undeclared field error on macOS.

import selectors

var selector: Selector[int] = newSelector[int]()
var events = select(selector, 1)

The error:

prob.nim(4, 20) template/generic instantiation of `select` from here
../../.choosenim/toolchains/nim-#devel/lib/pure/ioselects/ioselectors_kqueue.nim(589, 25) template/generic instantiation of `selectInto` from here
../../.choosenim/toolchains/nim-#devel/lib/pure/ioselects/ioselectors_kqueue.nim(503, 37) Error: undeclared field: 'OSErrorCode' for type system.int [declared in ../../.choosenim/toolchains/nim-#devel/lib/system.nim(26, 3)]  

Similarly to #7667, importing os at the top of the file is a workaround.

This is the output of nim --version:

Nim Compiler Version 0.19.9 [MacOSX: amd64]
Compiled at 2019-04-20
Copyright (c) 2006-2019 by Andreas Rumpf

active boot switches: -d:release

@dom96 dom96 added the High Priority label Apr 27, 2019

@dom96

This comment has been minimized.

Copy link
Member

commented Apr 27, 2019

Marking this high pri because I've experienced it myself and seen it reappear a couple of times now. This shouldn't still be happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.