nim-lang / Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
https://nim-lang.org
Other
16.55k stars 1.47k forks source link

getOccupiedMem Undocumented #9245

Closed juancarlospaco closed 5 years ago

juancarlospaco commented 6 years ago

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:

CNunezEng commented 6 years ago

I will take care of this.

demotomohiro commented 5 years ago

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.

narimiran commented 5 years ago

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