Nim icon indicating copy to clipboard operation
Nim copied to clipboard

Missing `dochack.nim` in 2.2.4 release (on brew)?

Open binhonglee opened this issue 4 months ago • 0 comments

Nim Version

2.2.4

Description

I installed nim through brew (brew install nim) which is v2.2.4 and mostly working except I can't build docs with --index:on or --project flag because it keeps complaining about missing dockhack.nim file.

Image

I looked into the folder and it seems like it just don't have the tools folder entirely in the installation directory. Not sure if I'm missing something here.

Image

I did lookup the tar.xz on brew config which does seem to contain the tools directory (and dochack.nim file in it).

Not sure if I'm missing anything.

Current Output

❯ nim doc --project --index:on -o:docs/api/ src/main/wings.nim                                                                      
Hint: used config file '/opt/homebrew/Cellar/nim/2.2.4/nim/config/nim.cfg' [Conf]
Hint: used config file '/opt/homebrew/Cellar/nim/2.2.4/nim/config/config.nims' [Conf]
Hint: used config file '/opt/homebrew/Cellar/nim/2.2.4/nim/config/nim.cfg' [Conf]
Hint: used config file '/opt/homebrew/Cellar/nim/2.2.4/nim/config/config.nims' [Conf]
Hint: used config file '/opt/homebrew/Cellar/nim/2.2.4/nim/config/nimdoc.cfg' [Conf]
....................................................................................................................................getDocHacksJs: cmd: /opt/homebrew/Cellar/nim/2.2.4/nim/bin/nim js -d:release /opt/homebrew/Cellar/nim/2.2.4/nim/tools/dochack/dochack.nim
Hint: used config file '/opt/homebrew/Cellar/nim/2.2.4/nim/config/nim.cfg' [Conf]
Hint: used config file '/opt/homebrew/Cellar/nim/2.2.4/nim/config/config.nims' [Conf]
........................................
Error: cannot open '/opt/homebrew/Cellar/nim/2.2.4/nim/tools/dochack/dochack.nim'
assertions.nim(34)       raiseAssert
Error: unhandled exception: nimpaths.nim(52, 5) `execShellCmd(cmd) == 0` /opt/homebrew/Cellar/nim/2.2.4/nim/bin/nim js -d:release /opt/homebrew/Cellar/nim/2.2.4/nim/tools/dochack/dochack.nim [AssertionDefect]

Expected Output

Successfully build the doc

Known Workarounds

Can probably build each file manually instead of using --project flag? Can't think of a workaround for --index:on tho.

Additional Information

No response

binhonglee avatar Jun 15 '25 23:06 binhonglee