Skip to content
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

LDoc breaks when loading config file. #390

Open
alexgibbs606 opened this issue Mar 30, 2023 · 2 comments
Open

LDoc breaks when loading config file. #390

alexgibbs606 opened this issue Mar 30, 2023 · 2 comments

Comments

@alexgibbs606
Copy link

Having trouble running ldoc with a config file. I'm able to run using the following command and it generates documentation just fine.

ldoc ./lua/ -d ./lua/doc -f markdown

Where ldoc is aliased to my Lua for Windows install and the ldoc.lua file.

# ~/.bashrc
# Adding system lua as alias
alias slua="\"/c/Program Files (x86)/Lua/5.1/lua.exe\""
# Adding LDoc as alias
ldocLua="\"/c/Users/AleX/bin/lua/LDoc/ldoc.lua\""
# Adding a lua doc command to generate lua docs
alias ldoc="slua \"$ldocLua\" $@"

However; when I try to get a little more complex with my documentation (or streamline) by adding a config file in ANY WAY, I get the following error.

AleX@yennefer:~/x/DFCP-ME/bin/lua € ldoc .
reading configuration from config.ld
C:\Program Files (x86)\Lua\5.1\lua.exe: C:/Users/AleX/bin/lua/LDoc/ldoc.lua:265: bad argument #1 to 'load' (function expected, got string)
stack traceback:
        [C]: in function 'load'
        C:/Users/AleX/bin/lua/LDoc/ldoc.lua:265: in function 'loadstr'
        C:/Users/AleX/bin/lua/LDoc/ldoc.lua:287: in function 'read_ldoc_config'
        C:/Users/AleX/bin/lua/LDoc/ldoc.lua:333: in main chunk
        [C]: ?

My currently config file looks like

file = {
	"colxtion.lua",
	"mission.lua",
	"zipperz.lua",
}

title = "DFCP-ME Documentation"
project = "DFCP Mission Editing Tools"
description = "DFCP Offline Mission Editing Toools"

format = "markdown"

I've tried not specifying input file in the config file per #351, but didn't have any success. I even cloned the pull request for that issue without success.

I'm sure it's just something simple I have/haven't done with my setup that I'm missing, just looking for some guidance.

@Tieske
Copy link
Member

Tieske commented Mar 30, 2023

just a guess;

alias slua="\"/c/Program Files (x86)/Lua/5.1/lua.exe\""

this has spaces in it. Can you try whilst using the Windows short-name instead?

@alexgibbs606
Copy link
Author

I'm unable to in this specific context as I'm using a bash terminal on windows; but, since the process without a config file is working fine, I'm assuming this error isn't the reference to the interpreter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants