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

it's hard to keep macro and rule documentation in sync #62

Closed
dgoldstein0 opened this issue Aug 12, 2020 · 4 comments
Closed

it's hard to keep macro and rule documentation in sync #62

dgoldstein0 opened this issue Aug 12, 2020 · 4 comments

Comments

@dgoldstein0
Copy link

macros generally wrap commonly-used patterns of rules to make them easier to write. As such a very common pattern is to have the macro take a bunch of arguments and forward most of those verbatim or near-verbatim to various rules. The trouble is that when these patterns are combined with stardoc documentation, it ends up being necessary to repeat the same documentation for each rule attribute in the macro's docstring. If there were some way for the macro to refer to the rule attributes documentation, it would cut the docs that we need to write in ~half for these cases - or possibly even more when the same attribute is shared between several rules and many macros.

In practice, much of the macro documentation in the codebase I work in is actually incomplete because it's just too much effort to manually duplicate it all.

@thomasvl
Copy link
Member

thomasvl commented Sep 3, 2020

It sorta sounds like this might be a dup of #27

@dgoldstein0
Copy link
Author

yeah, essentially the same problem, though I didn't propose a solution.

In addition to the "macro wraps a rule" case, it'd also be nice to also support the case of a macro that splits it's arguments between a few rules, and avoid repeating the attribute documentation for the macro docstring. It's possible the proposed solution in #27 will solve that second use case too.

I would not object to this being closed as a dupe; thanks for pointing out the other ticket, I'm now subscribed there.

@larsrc-google
Copy link

Duplicate of #27

@larsrc-google larsrc-google marked this as a duplicate and then as not a duplicate of #27 Sep 14, 2020
@larsrc-google
Copy link

Duplicate of #27

@larsrc-google larsrc-google marked this as a duplicate of #27 Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants