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

"module(...) name deduction failed" #358

Open
AntumDeluge opened this issue Jul 23, 2021 · 0 comments
Open

"module(...) name deduction failed" #358

AntumDeluge opened this issue Jul 23, 2021 · 0 comments

Comments

@AntumDeluge
Copy link
Contributor

This appears to be related to #59.

config.ld: (located in ./docs/)

project = "3d_armor"
title = "3D Armor"
format = "markdown"
not_luadoc = true
boilerplate = false
wrap = false

file = {
	"api.lua",
	"armor.lua",
	"../shields/init.lua",
}

gendoc.sh: (script used to execute, located in ./docs/)

#!/usr/bin/env bash

docs="$(dirname $(readlink -f $0))"
root="$(dirname ${docs})"
config="${docs}/config.ld"

cd "${root}"

# Clean old files
rm -rf "${docs}/reference"

# Create new files
ldoc -c "${config}" -d "${docs}/reference" "${root}"

Result:

$ ./docs/gendoc.sh
reading configuration from C:/Games/Minetest/mods/3d_armor/3d_armor/docs/config.ld
module(...) name deduction failed: base c:\games\minetest\mods\3d_armor\3d_armor\ c:\games\minetest\mods\3d_armor\shields\init.lua

"items" module: (located at ./armor.lua)

--- Registered armors.
--
--  @module items

"items" submodule: (located at ../shields/init.lua)

--- Registered shields.
--
--  @submodule items

Changing ../shields/init.lua to a normal module works:

--- Registered shields.
--
--  @module shields

Result:

$ ./docs/gendoc.sh
reading configuration from C:/Games/Minetest/mods/3d_armor/3d_armor/docs/config.ld
format: using built-in markdown
output written to c:\games\minetest\mods\3d_armor\3d_armor\docs\reference

How can I make ../shields/init.lua a submodule of items?

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

1 participant