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

@type changes behavior when used in @submodule #377

Open
BiterUnion opened this issue Sep 10, 2022 · 5 comments
Open

@type changes behavior when used in @submodule #377

BiterUnion opened this issue Sep 10, 2022 · 5 comments

Comments

@BiterUnion
Copy link

My setup:
I have a project where I provide several modules consisting of multiple classes. Each class is implemented in its own file and documented using @type. For each module, I have put a @module tag in one of module's lua files (the first one parsed by LDoc) and @submodule tags in module's other files.

The issue:
The @type tags seem to work differently, when used in a @submodule instead of a @module:
In a @module, the @types are listed as "Class ExampleClass" in the generated docs.
In a @submodule, the @types are listed as "ExampleClass Functions" and the description provided to @type is missing.
I would expect that the @type tag works the same in both cases.

I could not find any information in the docs or existing issues that this might be intended behavior.

@alerque
Copy link
Member

alerque commented Sep 10, 2022

This sounds like a bug; given your description I would expect the two cases to behave the same as well. I'm going to be on very low availability for at least a month, but I'll try to check in and at least facilitate a PR if anybody jumps in with contributions. Even short of a PR fixing this an MWE demonstrating the problem in a way I or another developer could reproduce easily would save time tracking down the problem.

@BiterUnion
Copy link
Author

Thanks for your quick response. I have created a MWE, similar to the tests in the repo. Would you like me to create a PR for adding the test or should I send you the files?

@alerque
Copy link
Member

alerque commented Sep 10, 2022

If the MWE is setup like the existing tests a PR for it would be fantastic!

@BiterUnion
Copy link
Author

I just created the PR. Let me know if anything is missing or should be changed, this is my first public PR ;)

@alerque
Copy link
Member

alerque commented Sep 10, 2022

Thanks. The PR looks good!

I think there is some sort of trigger missing or we need to tweak the expectations for the test — the goal even before fixing the bug here is to have CI start failing to produce the expected result on account of the bug. But having the MWE to work from is a great start.

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