evaera / moonwave

Moonwave is a tool for generating documentation from comments in Lua source code.
https://eryn.io/moonwave/
Mozilla Public License 2.0
148 stars 23 forks source link

Allow us to use `@ignore` directly on classes #77

Closed lucasmz-dev closed 2 years ago

lucasmz-dev commented 2 years ago

Allowing us to use @ignore in Moonwave would make my and other persons' lifes way easier, there are two use cases, but here's my use case for this:

I have 3 versions of a library, in this case, it's FastSignal. I want all of them to have Moonwave comments on them (as I want proper Roblox-LSP support in the future), but I don't want methods to show up multiple times because of that.

image

What I currently have to do is add a @ignore tag to every thing under that class. That's annoying, takes precious time that could be spent fixing, or adding features.

Having @ignore work on this scenario, would not only make this much easier, it would also fix the entire thing with dependencies inside other libraries having their methods shown.

Take Helium, it has Janitor as a dependency, and for Janitor to not show up under Moonwave, it was required to remove all moonwave comments, if Janitor updates, and Helium wants to do update its Janitor, then it needs to do that all-over again, and it's annoying.

Being able to add a @ignore tag right away on the main class of those, which would make the class and it's methods disappear, would immediately fix that, and make the entire process quicker, and not breaking possible future Roblox LSP connectivity with moonwave.

Also if this is just a bug that shouldn't be happening let me know, but yeah @ignore is not working for me inside class definitions.

image

lucasmz-dev commented 2 years ago

@evaera

Would like to state this, the @ignore tag hides any other classes called the same thing which would otherwise just caused collisions before.

With a @ignore tag in one script:

image

Without a @ignore tag in one script:

image

So while it's still useful to me, it does not accommodate my biggest use case. I would guess this is unsolvable because of the nature of Moonwave works.

evaera commented 2 years ago

If they have different members, they are a different class, right?

lucasmz-dev commented 2 years ago

@evaera

Well, in my case I have two versions of the same library, both with Moonwave comments because it connects with Roblox LSP nicely. What happens here, is that I have to add a @ignore tag to every member in one of the versions, so 2 members don't appear. I submitted this in the hopes that having a @ignore tag would allow me to fix this without having to go through the entire script checking for it every release. But now, if I have a @ignore tag on one of the class references, it will hide that class even if the other script doesn't say it's hidden.

It seems like I'm having issues even doing that hack, still confirming that though, doing a cleanup of Moonwave just to be sure, notifying you in that case. Yup. Even that isn't working anymore.