planety / prologue

Powerful and flexible web framework written in Nim
https://planety.github.io/prologue
Apache License 2.0
1.24k stars 47 forks source link

Unable to generate docs for projects using prologue #118

Closed williamhatcher closed 2 years ago

williamhatcher commented 3 years ago

When running nim doc or nim doc2 on a file/project that imports prologue the following error occurs: Running nim 1.4.2 prologue 0.4.4 macOS 11.2.3 Tested against a file with contents: import prologue

Hint: used config file '/Users/william/.choosenim/toolchains/nim-1.4.2/config/nim.cfg' [Conf]
Hint: used config file '/Users/william/.choosenim/toolchains/nim-1.4.2/config/config.nims' [Conf]
Hint: used config file '/Users/william/.choosenim/toolchains/nim-1.4.2/config/nimdoc.cfg' [Conf]
...................................................................
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(62, 14) Error: ambiguous identifier: 'SocketHandle' -- use one of the following:
  winlean.SocketHandle: SocketHandle
  posix.SocketHandle: SocketHandle
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(201, 34) Error: ambiguous identifier: 'SocketHandle' -- use one of the following:
  winlean.SocketHandle: SocketHandle
  posix.SocketHandle: SocketHandle
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(281, 20) template/generic instantiation of `closeClient` from here
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(206, 11) Error: undeclared field: 'SocketHandle' for type system.int [declared in /Users/william/.choosenim/toolchains/nim-1.4.2/lib/system/basic_types.nim(2, 3)] 
  found 'winlean.SocketHandle [declared in /Users/william/.choosenim/toolchains/nim-1.4.2/lib/windows/winlean.nim(458, 3)]' of kind 'type'
  found 'posix.SocketHandle [declared in /Users/william/.choosenim/toolchains/nim-1.4.2/lib/posix/posix_macos_amd64.nim(23, 3)]' of kind 'type'
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(281, 20) template/generic instantiation of `closeClient` from here
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(206, 11) Error: undeclared field: '.' for type system.int [declared in /Users/william/.choosenim/toolchains/nim-1.4.2/lib/system/basic_types.nim(2, 3)] 
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(281, 20) template/generic instantiation of `closeClient` from here
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(206, 11) Error: expression '.' cannot be called
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(287, 21) template/generic instantiation of `acceptClient` from here
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(186, 29) Error: undeclared field: 'SocketHandle' for type system.int [declared in /Users/william/.choosenim/toolchains/nim-1.4.2/lib/system/basic_types.nim(2, 3)] 
  found 'winlean.SocketHandle [declared in /Users/william/.choosenim/toolchains/nim-1.4.2/lib/windows/winlean.nim(458, 3)]' of kind 'type'
  found 'posix.SocketHandle [declared in /Users/william/.choosenim/toolchains/nim-1.4.2/lib/posix/posix_macos_amd64.nim(23, 3)]' of kind 'type'
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(287, 21) template/generic instantiation of `acceptClient` from here
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(186, 29) Error: undeclared field: '.' for type system.int [declared in /Users/william/.choosenim/toolchains/nim-1.4.2/lib/system/basic_types.nim(2, 3)] 
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(287, 21) template/generic instantiation of `acceptClient` from here
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(186, 29) Error: expression '.' cannot be called
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(287, 21) template/generic instantiation of `acceptClient` from here
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(186, 29) Error: expression '' has no type (or is ambiguous)
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(408, 27) template/generic instantiation of `format` from here
/Users/william/.choosenim/toolchains/nim-1.4.2/lib/pure/times.nim(2017, 65) template/generic instantiation from here
/Users/william/.choosenim/toolchains/nim-1.4.2/lib/pure/times.nim(2019, 28) Error: can raise an unlisted exception: ref TimeFormatParseError
/Users/william/.nimble/pkgs/httpx-0.2.4/httpx.nim(432, 46) Error: type mismatch: got <Handle>
but expected one of: 
proc getFd(socket: Socket): SocketHandle
  first type mismatch at position: 1
  required type for socket: Socket
  but expression 'getIoHandler(disp)' is of type: Handle
proc getFd[T](s: Selector[T]): int
  first type mismatch at position: 1
  required type for s: Selector[getFd.T]
  but expression 'getIoHandler(disp)' is of type: Handle

expression: getFd(getIoHandler(disp))
/Users/william/.nimble/pkgs/prologue-0.4.4/prologue/core/form.nim(28, 19) Error: expression '' has no type (or is ambiguous)
/Users/william/.nimble/pkgs/prologue-0.4.4/prologue/core/form.nim(28, 5) Error: 'let' symbol requires an initialization
/Users/william/.nimble/pkgs/prologue-0.4.4/prologue/core/form.nim(29, 17) Error: expression '' has no type (or is ambiguous)
/Users/william/.nimble/pkgs/prologue-0.4.4/prologue/core/form.nim(29, 5) Error: 'let' symbol requires an initialization
.....
/Users/william/.nimble/pkgs/prologue-0.4.4/prologue/core/nativesettings.nim(70, 29) Error: expression '' has no type (or is ambiguous)
....
/Users/william/.choosenim/toolchains/nim-1.4.2/lib/pure/collections/critbits.nim(25, 14) Error: internal error: ReplaceTypeVarsN: when condition not a bool
No stack traceback available
To create a stacktrace, rerun compilation with './koch temp doc <file>', see https://nim-lang.github.io/Nim/intern.html#debugging-the-compiler for details
ringabout commented 3 years ago

known issues(stdlib)

see https://github.com/dom96/jester/issues/185 https://github.com/nim-lang/Nim/issues/8989

ringabout commented 2 years ago

should be fixed by https://github.com/xflywind/httpx/pull/11