Nim: getOccupiedMem Undocumented

Created on 8 Oct 2018  路  3Comments  路  Source: nim-lang/Nim

getOccupiedMem() is completely Undocumented, at least a 1 line Documentation on the proc would make it appear on TheIndex or System
Simple to Fix. :sweat_smile:

Doc Generation Documentation

All 3 comments

I will take care of this.

getOccupiedMem() is declared in lib/system.nim and it already has document.

This command generates lib/system.html but there is no getOccupiedMem() in this page.

nim doc lib\system.nim

getOccupiedMem() is declared under when not defined(nimscript) and hasAlloc:.
I thought this when prevents this procedure's document.
I temporarily removed this when condition but getOccupiedMem() didn't appeared in the document.

I added following test procedure in lib/system.nim and testtest() appeared in the document.

proc testtest*(): int {.rtl.}
  ## Test test

proc testtest(): int {.rtl.} = 0

Then, I moved testtest() implementation to system/test.nim and added include "system/test.nim" in lib/system.nim.

lib/system.nim:

proc testtest*(): int {.rtl.}
  ## Test test

include "system/test.nim"

lib/system/test.nim:

proc testtest(): int {.rtl.} = 0

Then testtest() disappeared from document!
I changed testtest() to testtest*() in lib/system/test.nim, but it still didn't appeared in the document.

Like this testtest(), getOccupiedMem() is declared in lib\system.nim and implemented in other file under lib/system directory (alloc.nim, gc_regions.nim, mmdisp.nim).
It seems like a bug of nim doc command.
This might be not simple to Fix.

getOccupiedMem() is completely Undocumented, at least a 1 line Documentation on the proc would make it appear on TheIndex or System

It has documentation: https://nim-lang.github.io/Nim/system.html#getOccupiedMem
and it has entry in the Index: https://nim-lang.github.io/Nim/theindex.html#getOccupiedMem

Was this page helpful?
0 / 5 - 0 ratings