jester
jester copied to clipboard
`nim doc` fails for any file that imports jester: Error: undeclared identifier: 'EWOULDBLOCK'
import jester
echo "ok1"
nim doc $timn_D/tests/nim/all/t0209.nim
Hint: used config file '/Users/timothee/git_clone/nim/Nim/config/nim.cfg' [Conf]
Hint: used config file '/Users/timothee/.config/nim/nim.cfg' [Conf]
Hint: used config file '/Users/timothee/git_clone/nim/timn/nim.cfg' [Conf]
Hint: used config file '/Users/timothee/git_clone/nim/Nim/config/config.nims' [Conf]
/Users/timothee/git_clone/nim/timn/tests/nim/all/t0209.nim(5, 1) template/generic instantiation from here
/Users/timothee/.nimble/pkgs/httpbeast-0.2.1/httpbeast.nim(183, 36) Error: undeclared identifier: 'EWOULDBLOCK'
/Users/timothee/git_clone/nim/timn/tests/nim/all/t0209.nim(5, 1) template/generic instantiation from here
/Users/timothee/.nimble/pkgs/httpbeast-0.2.1/httpbeast.nim(183, 49) Error: undeclared identifier: 'EAGAIN'
/Users/timothee/git_clone/nim/timn/tests/nim/all/t0209.nim(5, 1) template/generic instantiation from here
/Users/timothee/.nimble/pkgs/httpbeast-0.2.1/httpbeast.nim(183, 35) Error: ordinal type expected
/Users/timothee/git_clone/nim/timn/tests/nim/all/t0209.nim(5, 1) template/generic instantiation from here
/Users/timothee/.nimble/pkgs/httpbeast-0.2.1/httpbeast.nim(236, 23) Error: type mismatch: got <SocketHandle, ptr char, int, int literal(0)>
nim --version Nim Compiler Version 0.19.9 [MacOSX: amd64] Compiled at 2019-02-08 Copyright (c) 2006-2018 by Andreas Rumpf
git hash: 55fe7c114ed04cb18a8c33c0039ae66d6125c24f
the error was reported initially on sept 2018 here https://github.com/nim-lang/Nim/issues/8989 but still happens today
It seemed to me this was a nim bug but araq closed it there saying (https://github.com/nim-lang/Nim/issues/8989#issuecomment-462023442)
That's a jester bug.
proposal
reopen https://github.com/dom96/httpbeast/pull/14 ; I just checked, this fixes this issue @dom96
this issue is rather annoying as it prevents nim doc
if any of your modules imports jester. This PR would fix this.
trying to build nim doc jester.nim
on:
Nim Compiler Version 0.19.4 [Linux: amd64]
Compiled at 2019-02-01
Copyright (c) 2006-2018 by Andreas Rumpf
git hash: b6d96cafc8bcad1f3d32f2910b25cd11a93f7751
active boot switches: -d:release
I'm getting a similar issue (maybe the same one):
../httpbeast-0.2.1/httpbeast.nim(183, 36) Error: undeclared identifier: 'EWOULDBLOCK'
../httpbeast-0.2.1/httpbeast.nim(183, 49) Error: undeclared identifier: 'EAGAIN'
../httpbeast-0.2.1/httpbeast.nim(183, 35) Error: ordinal type expected
../httpbeast-0.2.1/httpbeast.nim(236, 23) Error: type mismatch: got <SocketHandle, ptr char, int, int literal(0)>
but expected one of:
proc send(socket: Socket; data: string; flags = {SafeDisconn})
first type mismatch at position: 1
required type: Socket
but expression 'SocketHandle(fd)' is of type: SocketHandle
proc send(socket: Socket; data: pointer; size: int): int
first type mismatch at position: 1
required type: Socket
but expression 'SocketHandle(fd)' is of type: SocketHandle
proc send(s: SocketHandle; buf: pointer; len, flags: cint): cint
first type mismatch at position: 3
required type: cint
but expression 'leftover' is of type: int
proc send(socket: AsyncFD; data: string; flags = {SafeDisconn}): Future[void]
first type mismatch at position: 1
required type: AsyncFD
but expression 'SocketHandle(fd)' is of type: SocketHandle
proc send(socket: AsyncFD; buf: pointer; size: int; flags = {SafeDisconn}): Future[void]
first type mismatch at position: 1
required type: AsyncFD
but expression 'SocketHandle(fd)' is of type: SocketHandle
expression: send(SocketHandle(fd), addr(data.sendQueue[data.bytesSent]), leftover, 0)
../httpbeast-0.2.1/httpbeast.nim(241, 33) Error: ordinal type expected
../httpbeast-0.2.1/httpbeast.nim(277, 45) Error: type mismatch: got <Handle>
but expected one of:
proc getFd[T](s: Selector[T]): int
proc getFd(socket: Socket): SocketHandle
expression: getFd(getIoHandler(disp))
I'm just getting into Nim, so I'm not to privvy as to whether httpbeast or jester is at the bottom of things.
I'm seeing a failuar similar to @ptdel
nim doc jester.nim
Hint: used config file '~/.choosenim/toolchains/nim-0.19.4/config/nim.cfg' [Conf]
Hint: used config file '~/.choosenim/toolchains/nim-0.19.4/config/nimdoc.cfg' [Conf]
Hint: system [Processing]
Hint: jester [Processing]
Hint: net [Processing]
Hint: nativesockets [Processing]
Hint: os [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: math [Processing]
Hint: bitops [Processing]
Hint: algorithm [Processing]
Hint: unicode [Processing]
Hint: times [Processing]
Hint: options [Processing]
Hint: typetraits [Processing]
Hint: strformat [Processing]
Hint: macros [Processing]
Hint: posix [Processing]
Hint: ospaths [Processing]
Hint: winlean [Processing]
Hint: dynlib [Processing]
Hint: sets [Processing]
Hint: hashes [Processing]
Hint: openssl [Processing]
Hint: strtabs [Processing]
Hint: re [Processing]
Hint: pcre [Processing]
Hint: rtarrays [Processing]
Hint: tables [Processing]
Hint: uri [Processing]
Hint: mimetypes [Processing]
Hint: asyncnet [Processing]
Hint: asyncdispatch [Processing]
Hint: heapqueue [Processing]
Hint: lists [Processing]
Hint: asyncstreams [Processing]
Hint: asyncfutures [Processing]
Hint: deques [Processing]
Hint: cstrutils [Processing]
Hint: md5 [Processing]
Hint: logging [Processing]
Hint: httpcore [Processing]
Hint: asyncfile [Processing]
Hint: macrocache [Processing]
Hint: json [Processing]
Hint: lexbase [Processing]
Hint: streams [Processing]
Hint: parsejson [Processing]
Hint: errorpages [Processing]
Hint: htmlgen [Processing]
Hint: utils [Processing]
Hint: cgi [Processing]
Hint: cookies [Processing]
Hint: request [Processing]
~/.nimble/pkgs/jester-0.4.1/jester/private/utils.nim(1, 2) Error: module names need to be unique per Nimble package; module clashes with ~/code/jester/jrepo/jrepoinner/jester/private/utils.nim
Hint: utils [Processing]
Hint: httpbeast [Processing]
Hint: selectors [Processing]
Hint: future [Processing]
Hint: osproc [Processing]
Hint: cpuinfo [Processing]
Hint: linux [Processing]
Hint: parser [Processing]
~/.nimble/pkgs/httpbeast-0.2.1/httpbeast.nim(183, 36) Error: undeclared identifier: 'EWOULDBLOCK'
~/.nimble/pkgs/httpbeast-0.2.1/httpbeast.nim(183, 49) Error: undeclared identifier: 'EAGAIN'
~/.nimble/pkgs/httpbeast-0.2.1/httpbeast.nim(183, 35) Error: ordinal type expected
~/.nimble/pkgs/httpbeast-0.2.1/httpbeast.nim(236, 23) Error: type mismatch: got <SocketHandle, ptr char, int, int literal(0)>
but expected one of:
proc send(socket: Socket; data: string; flags = {SafeDisconn})
first type mismatch at position: 1
required type: Socket
but expression 'SocketHandle(fd)' is of type: SocketHandle
proc send(socket: Socket; data: pointer; size: int): int
first type mismatch at position: 1
required type: Socket
but expression 'SocketHandle(fd)' is of type: SocketHandle
proc send(s: SocketHandle; buf: pointer; len, flags: cint): cint
first type mismatch at position: 3
required type: cint
but expression 'leftover' is of type: int
proc send(socket: AsyncFD; data: string; flags = {SafeDisconn}): Future[void]
first type mismatch at position: 1
required type: AsyncFD
but expression 'SocketHandle(fd)' is of type: SocketHandle
proc send(socket: AsyncFD; buf: pointer; size: int; flags = {SafeDisconn}): Future[void]
first type mismatch at position: 1
required type: AsyncFD
but expression 'SocketHandle(fd)' is of type: SocketHandle
expression: send(SocketHandle(fd), addr(data.sendQueue[data.bytesSent]), leftover, 0)
~/.nimble/pkgs/httpbeast-0.2.1/httpbeast.nim(241, 33) Error: ordinal type expected
~/.nimble/pkgs/httpbeast-0.2.1/httpbeast.nim(277, 45) Error: type mismatch: got <Handle>
but expected one of:
proc getFd[T](s: Selector[T]): int
proc getFd(socket: Socket): SocketHandle
expression: send(SocketHandle(fd), addr(data.sendQueue[data.bytesSent]), leftover, 0)
~/.nimble/pkgs/httpbeast-0.2.1/httpbeast.nim(241, 33) Error: ordinal type expected
~/.nimble/pkgs/httpbeast-0.2.1/httpbeast.nim(277, 45) Error: type mismatch: got <Handle>
but expected one of:
proc getFd[T](s: Selector[T]): int
proc getFd(socket: Socket): SocketHandle
expression: getFd(getIoHandler(disp))
jester/request.nim(101, 7) Warning: use stdlib; parseUrlQuery is deprecated [Deprecated]
Hint: patterns [Processing]
jester.nim(369, 24) Error: type mismatch: got <Request, utils.Settings>
but expected one of:
proc initRequest(req: NativeRequest; settings: Settings): Request
first type mismatch at position: 2
required type: Settings
but expression 'jes.settings' is of type: Settings
expression: initRequest(httpReq, jes.settings)
jester.nim(704, 26) Warning: initInterval is deprecated [Deprecated]
jester.nim(1353, 18) Warning: ident is deprecated [Deprecated]
jester.nim(1353, 12) Warning: $ is deprecated [Deprecated]
Jester's dead (well, actually just the nim doc) https://www.youtube.com/watch?v=BmP9b7McyAk