-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error message on invalid tag somewhat obtuse and doesn't point out the issue being the undefined tag #389
Comments
I have tracked down the issue to comments with wrong tags (such as the
The following error can also happen:
After removing the wrong tag, the error is solved. Should this have a better error message? |
Can you post an MWE and the error with error you get with v1.5.0? The example you show seems to work fine more me (in that it gives a sensible error about what is wrong with the input) not the stack trace you are showing. |
Apparently I'm running 1.4.6 (It's the latest one available on I'll try it later on a manually installed copy of 1.5.0. |
Ldoc v1.5.0 has been on LuaRocks since a few seconds of the tag being pushed to GitHub. What makes you say 1.4.6 is the latest? |
I guess I just had an old version. Doesn't matter though, I'm still having the issue on 1.5.0. I'll try to produce a MWE |
Yeah, I'm not sure why you're not getting the error. This is enough for me to reproduce it: ---
-- @description get a clone of the current state
-- @return a table representing the full state, containing mti (number) and mt (table of numbers)
function getState()
local r = {}
r.mti = mti
r.mt = {}
for i=0,N-1 do
r.mt[i] = mt[i]
end
return r
end Which yields the error:
Specs:
(You can ask for more info if you wish. I'm just not sure what info would help) |
I am able to reproduce that error, but not with the original circumstances of "it throws an error when pointing to the directory but works if pointing directly to a single file". I get the error when calling just on the file too. Is that still the case for you? |
Also, this error appears to be caused because you are using an undefined tag. Change |
Yep. I can't replicate that anymore. It also fails with just the file.
I already mentioned that it's caused by My contention is not really that an error happens, but that it is obtuse and it doesn't point to why. It simply fails catastrophically. I think it should still fail, with with a clean message, such as " |
tools.lua:221: invalid value (table) at index 1 in table for 'concat'
I missed that detail on trying to catch up the issue. I think it's clear now with an MWE and what needs fixing. This should be a relatively easy one to add a test with explicit error rather than falling through to a Lua error indexing undefined keys if anybody wants to tackle this. |
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 executingldoc <path_to_specific_lua_file>
.Full error message:
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.
The text was updated successfully, but these errors were encountered: