V version: V 0.1.29 84b8e0a
OS: Linux Mint 19.3
What did you do?
Tried making use of the 'vlib-docs' command to get the Vlib modules's documentation for offline viewing.
What did you expect to see?
Generate and open the documentation of all the vlib modules.
What did you see instead?
stunx@stunx-pc:~/.rockstargames/gta-mods/gtasaengine-in-v$ v vlib-docs
/home/stunx/.local/v/vlib/live/sharedlib/live_sharedlib.v:3:8: warning: module 'live' is imported but never used
1 | module sharedlib
2 |
3 | import live
| ~~~~
4 |
5 | pub const (
/home/stunx/.local/v/vlib/math/big/big.v:79:18: warning: use e.g. `x := [1]Type{}` instead of `x := [1]Type`
77 |
78 | pub fn (n Number) hexstr() string {
79 | mut buf := [8192]byte
| ^
80 | C.bignum_to_string( &n, buf, 8192)
81 | // NB: bignum_to_string , returns the HEXADECIMAL representation of the bignum n
/home/stunx/.local/v/vlib/sokol/sapp/sapp.v:4:1: error: use `v --enable-globals ...` to enable globals
2 |
3 | // Android needs a global reference to `g_desc`
4 | __global g_desc C.sapp_desc
| ~~~~~~~~
5 |
6 | pub fn create_desc() C.sg_desc {
Just use v doc to look at the docs.
Compiling that code still shouldn't give those errors, but v doc is the "correct" way to look at the module docs.
Or you can just browse to https://modules.vlang.io, which was generated with v doc.
The same thing happens to me with v doc -m .
stunx@stunx-pc:~/.local/v/vlib$ v doc -m .
live/sharedlib/live_sharedlib.v:3:8: warning: module 'live' is imported but never used
1 | module sharedlib
2 |
3 | import live
| ~~~~
4 |
5 | pub const (
math/big/big.v:79:18: warning: use e.g. `x := [1]Type{}` instead of `x := [1]Type`
77 |
78 | pub fn (n Number) hexstr() string {
79 | mut buf := [8192]byte
| ^
80 | C.bignum_to_string( &n, buf, 8192)
81 | // NB: bignum_to_string , returns the HEXADECIMAL representation of the bignum n
sokol/sapp/sapp.v:4:1: error: use `v --enable-globals ...` to enable globals
2 |
3 | // Android needs a global reference to `g_desc`
4 | __global g_desc C.sapp_desc
| ~~~~~~~~
5 |
6 | pub fn create_desc() C.sg_desc {
I think I better use https://modules.vlang.io
vdoc doesn't generate docs if there's an error detected by the parser. The .vdocignore found on vlib/ must be updated to ignore the sokol.sapp submodule.