ldoc icon indicating copy to clipboard operation
ldoc copied to clipboard

Error message on invalid tag somewhat obtuse and doesn't point out the issue being the undefined tag

Open luiz00martins opened this issue 2 years ago • 10 comments
trafficstars

This error happens even if there's no actual file being processed (i.e. all files are no module() call found; no initial doc comment).

The error happens when executing ldoc <path_to_folder>. LDoc works fine however when executing ldoc <path_to_specific_lua_file>.

Full error message:

template failed for scripts.lib.utils.random: ...apps/luarocks/current/rocks/share/lua/5.4/ldoc\tools.lua:221: invalid value (table) at index 1 in table for 'concat'
stack traceback:
        [C]: in function 'table.concat'
        ...apps/luarocks/current/rocks/share/lua/5.4/ldoc\tools.lua:221: in function 'ldoc.tools.join'
        (...tail calls...)
        [string "TMP"]:311: in function <[string "TMP"]:1>
        [C]: in function 'xpcall'
        ...pps/luarocks/current/rocks/share/lua/5.4/pl\template.lua:140: in function <...pps/luarocks/current/rocks/share/lua/5.4/pl\template.lua:133>
        (...tail calls...)
        .../apps/luarocks/current/rocks/share/lua/5.4/ldoc\html.lua:283: in local 'templatize'
        .../apps/luarocks/current/rocks/share/lua/5.4/ldoc\html.lua:375: in function 'ldoc.html.generate_output'
        ...rrent\rocks\lib\luarocks\rocks-5.4\ldoc\1.4.6-2\bin\ldoc:830: in main chunk
        [C]: in ?

I'm using windows 10, with lua 5.4.2, ldoc 1.4.6

Edit: Was able to replicate the same issue in Pop OS.

luiz00martins avatar Mar 28 '23 12:03 luiz00martins